Handle multiple window in Python

0
0

I am working in selenium automation project. Here i am using python language for selenium automation instead of Java.

I am facing an issue,handling multiple windows

Scenario is when I click a link in home page a new window opens.In the newly opened window I cannot perform any actions because the control is still in the home page web driver.

Can anybody paste some code here to set focus the control from the background window to the newly opened window.

A possible solution is self.driver.switchtowindow() is there in the library.But it requires a window name.How to find the window name? If this is wrong can anybody give some codes to perform this action?

  • You must to post comments
0
0

window_handles should give you the references to all open windows.

this is what the docu has to say about switching windows.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website