deactivate
deactivate

Reputation: 71

How to enter the credentials in a new window using Selenium?

I need to enter credentials in a new window opened using Selenium. I am using selectWindow command but the name of the window is dynamic. Please suggest how can I handle this.

Thanks

Upvotes: 0

Views: 609

Answers (1)

Santoshsarma
Santoshsarma

Reputation: 5667

  1. First get the main window handle (getWindowHandle()) before opening new window.
  2. Using getWindowHandles() you can get all opened window handles.
  3. Using above two things try to get newly opened window handle.

Refer below link for full logic .

http://santoshsarmajv.blogspot.in/2012/04/how-to-switch-control-to-pop-up-window.html

Upvotes: 1

Related Questions