SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.23k stars 8.12k forks source link

[🐛 Bug]: selenium safari with httpauthentication #14527

Open AnandChaurasia opened 1 hour ago

AnandChaurasia commented 1 hour ago

What happened?

Hi, I am try to launch url in safari with http authentication. My script is throwing selenium timeout exceptions because url is not loading complete. This is true because authentication pop-up opens and safari is expecting user and password. Because it is not accepting user and password with url. Can any one here help how to automate on safari with user and password as part of url.

How can we reproduce the issue?

Steps
1. Create webDriver for safari 
2. Navigate to url content user ID and password 
3. Failed to Navigate as pop for user ID and password  appearing

Relevant log output

Failed to launch browser time out exception.

Operating System

Mac OS

Selenium version

Lastly version

What are the browser(s) and version(s) where you see this issue?

Safari

What are the browser driver(s) and version(s) where you see this issue?

Latest

Are you using Selenium Grid?

Selenium 4

github-actions[bot] commented 1 hour ago

@AnandChaurasia, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

AnandChaurasia commented 1 hour ago

I have seen some comments regarding this issue fix : username/password to login to the site. To login to a site that requires HTTP basic authentication, use a username and password in the URL, as described in RFC 1738_, like this: open("http://myusername:myuserpassword@myexample.com/blah/blah/blah"). This would work perfectly in Firefox, Opera or Safari