A
A
ahahaha2017-07-23 13:23:46
Node.js
ahahaha, 2017-07-23 13:23:46

How to deal with new open tab using selenium?

the fact is that the code that initially works on one site and one tab eventually follows the link and the opening occurs in a new tab on another site, and how to make selenium understand that I am on another site and work with its DOM?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wateva, 2017-08-10
@wateva

If you know exactly when a new tab appears, then the task is simply to switch to the second tab:

driver.switchTo().window(driver.getWindowHandles().get(1));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question