Hey there! any question in your mind? Ask It Now!.

Popular Categories

Switch to new window and come back to original window.

0 votes
asked in Software Testing by anonymous
I am switching to new window in selenium web driver its happening by driver.switch().towindow() but when I am coming back to original window actions like click,sendkey are not performing on original window. I am coming back like driver.switch().toorignal().


Please help with an example .

1 Answer

+1 vote
answered by anonymous
Get the parent window name before navigating to new window using driver.getWindowHandle();

Perform the operations


switch the window to Original window using driver.switchTo.window(windowname).

Related Questions

Not a Member yet?

Ask to Folks Login

My Account
268 Folks are online
1 members and 267 guest online
Your feedback is highly appreciated