Reputation: 55
I have a problem accessing the site where authentication in the form of an alert is required. Photo: Click here
My data: Login: login Password: password@123
I set this address in the propertires file:
url=http://login:password@[email protected]
driver.manage().deleteAllCookies();
driver.get(data.getData().getProperty("url"));
Thread.sleep(5000);
log.info("Successed Login ");
I can't access the page. The problem is probably because the @ sign is in the password. Unfortunately I can't change it. Is there any solution for this?
Thank you in advance for your help
Upvotes: 1
Views: 100
Reputation: 5909
It looks like you need to use some encoding to escape the character. According to this documentation on RFC3986, you can encode @
using the %40
character:
url= "http://login:password%[email protected]"
Upvotes: 1