Navigate in a End-to-End test

How can I change view in the end to end test? I trying to find the SideNavItem in my view and execute the click listener but I don’t know how to does this.

I find the tag with this code:

By sideBarId = By.id(id);
TestBenchElement element = findElement(sideBarId);

but when I use element.click() the project dont change the view.

There should be SideNavElement and SideNavItemElement for thesting, see flow-components/vaadin-side-nav-flow-parent/vaadin-side-nav-flow-integration-tests/src/test/java/com/vaadin/flow/component/sidenav/tests/SideNavIT.java at main · vaadin/flow-components · GitHub

@yummy-rhino dont have this package in my project
image.png

Oh, something has gone wrong in the release process, the module do exists flow-components/vaadin-side-nav-flow-parent/vaadin-side-nav-testbench at main · vaadin/flow-components · GitHub

But I can verify your finding, I can’t use them in my test project either

this module should be in testbench or a separated dependency?

Fix is under works chore: add vaadin-side-nav-testbench to testbench poms by mcollovati · Pull Request #4874 · vaadin/platform · GitHub

tks

Quick plug, but you can also use Aire::Test (I’m the lead developer) to do this in a unit-testing environment: https://github.com/aire-ux/aire-test