1

On main window when clicking on a link takes me to Facebook page where I give the credentials and upon submit, window closes automatically(Facebook window).Now I have to perform some action on the main window but I am unable to switch to the main window.

I have used WindowHandles and tried to switch to the main window but no success.

In the main window when click on a link(Facebook link) the url changes immediately after clicking the link.

  • hi buddy...check this link ...http://stackoverflow.com/questions/11614188/switch-between-two-browser-windows-using-selenium-webdriver ...i hope it solves the problem – Anuragh27crony Dec 01 '12 at 16:25
  • Hope my answer for another question will solve the issue - [http://stackoverflow.com/questions/9588827/webdriver-switch-to-new-browser-opened-after-click-on-button/9597714#9597714][1] [1]: http://stackoverflow.com/questions/9588827/webdriver-switch-to-new-browser-opened-after-click-on-button/9597714#9597714 – Surya Dec 14 '12 at 05:35
  • On one hand you say you are using the main window and then "it closes automatically" BUT on the other hand you imply the main window is still open as you "perform another action". So, what is it? Can you clarify what is happening? Your question is unclear and people are guessing. – djangofan Jul 30 '13 at 22:45
  • [Gaurang Shah](http://www.automationtesting.co.in/2009/07/selenium-handling-windows.html) has it about right. – MikeJRamsey56 Mar 24 '16 at 02:07

0 Answers0