I am working on selenium automation project using Python.
I am facing an issue, which is handling multiple browser windows.
Scenario is as f
We can handle the different windows by moving between named windows using the “switchTo” method:
driver.switch_to.window("windowName")
Click here to open a new window
Alternatively, you can pass a “window handle” to the “switchTo().window()” method. Knowing this, it’s possible to iterate over every open window like so:
for handle in driver.window_handles:
driver.switch_to.window(handle)