How to login into any site if it is showing an authentication pop-up for username and password?



How to login into any site if it is showing an authentication pop-up for username and password?..

Answer / Rukmani Gunjiyal

To handle an authentication pop-up in Selenium WebDriver, you need to switch to the pop-up window (using `driver.switchTo().alert()` or `driver.switchTo().window(popup_handle)`), enter the credentials, and then click on the login button.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

What is the main disadvantage of implicit wait?

1 Answers  


How can I read test data from excels?

1 Answers  


Which is the package which is to be imported while working with webdriver?

1 Answers  


What methods of robot class do you know?

1 Answers  


What are soft assert and hard assert in selenium?

1 Answers  


What is the difference between MaxSessions vs. Selenium grid MaxInstances properties?

1 Answers  


What exactly is selenium remote-control (rc) tool?

1 Answers  


Explain how you can insert a start point in selenium ide?

1 Answers  


How does one store the current url using selenium 2.0?

1 Answers  


Explain using webdriver how you can perform double click?

1 Answers  


Write a code snippet to launch chrome browser in webdriver.

1 Answers  


Write the code for reading and writing to excel through selenium?

1 Answers  


Categories