Selenium go to other page without accessing initial page

40 Views Asked by At

I want to make a UI test using selenium. Test flow is after load the initial page, clicking the next page button, and going to the next page

I have one page model that will follow the above test flow.(kinda like a dynamic page model, page elements will change when I am performing the test) And I want have another page model(expectedPage) that contains expected elements in the next page. (kinda like a static page model, page elements are the expected elements I want)

The previous page model will grab the web elements after we go to the next page. The latter page model is expecting to contain the elements located in the next page. In my test file, I will compare if the web elements in two models are the same

I read the selenium guide, and found we can give the driver a URL directly so that we can go to whatever page we want. But my app is a single-page-application, so it looks like the URL way can't help me locate the next page (url always point to the initial page). If it's possible to go to the (expectedPage) page model without accessing the initial page?

0

There are 0 best solutions below