E
E
EtherealFlame2019-06-24 19:30:55
Java
EtherealFlame, 2019-06-24 19:30:55

How to find elements on the page after following a link?

Tell me how to find the elements on the page, the point is that when writing the test, all the elements were found, as well as when switching to other pages through .click (). But I have a link selected from the array and stored in a variable

travel.trLink = tripCollection.get(i).findElement(By.className("SegmentTitle__header")).findElement(By.tagName("a")).getAttribute("href");

After that, a new page is opened and waiting for it to load.
driver.get(trLink);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("class=\"Root__main\"")));

The page opens correctly, but wait itself can no longer find any elements, I visited different locators on different page objects all the time returns waiting for visibility of element located.
There is a suspicion that with such a transition, the driver does not receive information about the page, but there are no ideas how to fix this. I also visited the transition through navigate but there is the same thing.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question