the popup window is only happening if I use the Fire Fox browser otherwise, is there a way to fix this problem? I have to enter userid/password every time the i use FF as my browser.
currently, I am entering every time i run my test which is very painful but looking to make it more automated....
I have goggled and found two links here and here but no avail
Handling login pop-up in Selenium by passing the credential in URL. The Basic authentication pop-up is like the alert pop-up . When we navigated to a specific web page that asks for the credential. To handle this, we can pass credentials (Username + Password) to the web page's URL.
Yes, it is possible to handle Windows based pop-ups in Selenium webdriver. Sometimes on clicking a link or a button, another window gets opened. It can be a pop up with information or an advertisement. The methods getWindowHandles and getWindowHandle are used to handle child windows.
2nd Step: Click on the "click me" button, as highlighted in the following screenshot, to see the prompt alert popup box. 3rd Step: Prompt alert box opens where the user can enter text in the text box. After entering user can accept or dismiss the alert box. Note: In Selenium Webdriver, locators like XPath, CSS, etc.
Pass username and password in the URL Passing username and password in the URL helps to avoid the login prompt. This is achieved by encoding the username and password in the URL, that is, prepending username:password@ to the hostname in the URL.
http://username:[email protected]
This worked for me (xyz.com being the site name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With