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

+2 votes
1 answer 251 views
+2 votes
1 answer 2,494 views
+2 votes
1 answer 209 views
+1 vote
1 answer 2,239 views
+5 votes
7 answers 14,590 views

Not a Member yet?

Ask to Folks Login

My Account
832 Folks are online
67 members and 765 guest online
Your feedback is highly appreciated