Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98787

How to handle authentication popup with Selenium WebDriver

$
0
0

I am trying to handle authentication popup through my selenium test by passing username and password in URL.

I have tried following solutions:

  1. I have tried to send username and password in URL
  2. I have tried handling with alert, it doesn't work.
  3. I have tried solutions provided in - How to handle authentication popup with Selenium WebDriver using Java, almost all other than AutoIT, none of them worked for me

I have a Maven project, I am trying to send url with username and password from project.properties file, which looks like this -

URL = https://username:password@URL

open url code-

WebDriver driver = new ChromeDriver();

driver.navigate.to(URL);

I get below error in browser console: "there has been a problem with your fetch operation: Failed to execute 'fetch' on 'Window': Request cannot be constructed from a URL that includes credentials"


Viewing all articles
Browse latest Browse all 98787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>