mrk2
mrk2

Reputation: 817

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?

Upvotes: 0

Views: 314

Answers (1)

Abhishek Yadav
Abhishek Yadav

Reputation: 459

You could try URL encoding for same:

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

//%5C is url encode of \

Upvotes: 1

Related Questions