-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
portable BASIC auth #453
Comments
There's a stub API to handle this, but it's not implemented anywhere: |
more info... good to have out there :) the W3C spec is working on 1.0 version, handling HTTP AUTH has been decided to be handled in the next version of the spec. The only bit in 1.0 covering a piece of HTTP Auth is that the driver should return when presented with a dialog. Keep in mind "Selenium" isn't intending on being spec compliant until we release a 4.0 version? (This is up in the air a bit as we want to make a '3.0' version that has the Selenium RC separation) |
recent commits to the IEDriver allow the use of setting the credentials in the Basic Auth dialog box. using driver.switchTo().alert().authenticateUsing (in java) or driver.switch_to.alert.authenticate (in python). This is currently only available with IE (and if you grab the latest from master) |
@lukeis Any estimation if/when this will be ported to Firefox/Chrome/others any time? In any case, simple authentication usage that does not involve sending in clear text any password would be nice to have (currently, when using the technique |
Firefox is unlikely to have this implemented in the Selenium project's FirefoxDriver. It's much more likely to get implemented in Marionette instead, although that is only implementing the w3c spec currently which only states to not block navigation when the authentication prompt is displayed. The behavior will be that after issuing a driver.get and the prompt appears, the get command will then immediately return. As for clear text going across the wire to control the remote end... sorry, this isn't going to be changed with this implementation and can still be logged in plain text by a hub or any other intermediary node. Also the transmission of the command is done in plain text, without ussing ssl. So anyone sniffing on the network would be able to read it too. |
Ok, fair enough. Thank you for pointing me towards Marionette - I had not heard about it yet. Thanks also for the clarification on clear text, and good luck with this project! |
+1 |
i need help in Authentication pop up. Neither this worked |
FYI - with Firefox 50, Selenium 3.0.1 and using the Alert API: Doing the same with Chrome 54 it hangs infinitely. |
Is there any progress on this issue? What is required to have this being "fixed"/provided for us testers/developers? The initial report (archived version at SeleniumHQ/selenium-google-code-issue-archive#34) was created 2007, now is ten years later ;) maybe some forgotten issue? |
Because Chrome 59 dropped support for providing the basic authentication in the URL [1], I am having problem how to do the basic authentication. When I try to: Is there a solution from selenium side to perform basic authentication? Here is my code:
And this is the exception I get:
I using ChromeDriver 2.30.477700, selenium 3.4.3 and Python Python 2.7.13. |
This is the relevant spec issue: w3c/webdriver#385 It's tagged for Milestone 2. This means it won't be in the first level of the spec (which is currently in CR), but should be in the next version of the spec. It's something that everyone wanted to have sorted out, but which we never managed to properly spec out. |
At the moment, WebDriver specification doesn't tell drivers to support HTTP authentication. Since Selenium implements the spec, it doesn't support auth as well. There is an open bug for specification to add support of HTTP authentication, so once it's done, support will be added to Selenium. Please, track w3c/webdriver#385. |
So for now the best option is to make Chrome extension. I guess I will go to that direction then. |
@p0deje Thanks for the information |
Easier than Chrome extension is to use chrome command line argument: Works also for Headless Chrome which do not support extensions properly. |
@rolish - can you provide a code example of how to handle the authentification using chrome command line argument ? |
@fmaupas, I'm using robot framework with selenium. Helper python function (robot keyword):
In robot framework I do:
Hope it helps. |
Hello, reading through old issue:
https://code.google.com/p/selenium/issues/detail?id=34
I can't find any descent way to test sites using basic auth that's stable and portable across browsers and OSes. Any hope selenium can implement reliable and portable basic auth support?
The text was updated successfully, but these errors were encountered: