简体   繁体   中英

Browser Authentication using Selenium

I am using following code to pass authorization:

WebDriver driver = new FirefoxDriver();
driver.get(http://domainName\\username:password@url);

But didn't succeed cause username contains:

domainName\username

I think the problem is in this? any other ways to pass authorization?

You could try URL encoding for same:

driver.get(http://domainName%5Cusername:password@url);

// %5C is url encode of \\

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM