You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Basic Authentication in Firefox from within robotframework #164
I have a problem to log in on Firefox 18 with basic authentication.
I googled the below workaround, but i do not understand how i need to integrate this solution in robotframework.
It seems i need to use the Selenium webdriver for this, but how do i call this upfront, and what about the "Library Selenium2Library" in my testcase-file .
Can i call this code upfront, and use this selenium-object as a variable in my testcase file?
[workaround]
Firefox 17 'username:password' (RFC1738) processing is disallowed by default in Firefox (it had worked earlier). However, I've found that it can be re-enabled by:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.negotiate-auth.trusteduris", hostname);
driver = new FirefoxDriver(profile);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
selenium = new WebDriverBackedSelenium(driver, "http:// + username + ":"
+ password + "@"
+ hostname + ":" + port + baseUrl);
Works on Selenium 2.28.0, Firefox 17; used for DigestAuth login.
i found a solution on the net which is more elegant:
for robotframework-Selenium2Library (which i'm not succeeding to install for the moment), you can set a custom profile yourself with the option ff_profile_dir of the "start Selenium Server" keyword.
This option is not supported on SeleniumLibrary.
Since i'm using ant java task to start robotframework , the above method is not usable anyhow (it seems my classpath is not correct, and therefore roboframework cannot find the selenium-server.jar). That is the reason why i start Selenium server (standalone) upfront before my robotframework testcases , and in there you can define the optional parameter "firefoxProfileTemplate":
generate a new firefox profile by starting the ff profile manager (dos prompt: ff.exe -p)
start ff with this profile.
install the add-on Auto-auth, (which allows you to log on automatically on sites with basic auth when you have stored the credentials in the password manager of ff; without this add-on, for every new session you will get prompted for the credentials, even if you stored them in the password manager.)
goto your website, fill in the credentials, and save them in the password manager.
use this profile to run your robotframework tests: start the selenium server standalone with the option -firefoxProfileTemplate 'C:\Program Files (x86)\Mozilla Firefox...\path_to_this_new_profile'
Activity
DJoeri commentedon Jan 25, 2013
i found a solution on the net which is more elegant:
This option is not supported on SeleniumLibrary.
Since i'm using ant java task to start robotframework , the above method is not usable anyhow (it seems my classpath is not correct, and therefore roboframework cannot find the selenium-server.jar). That is the reason why i start Selenium server (standalone) upfront before my robotframework testcases , and in there you can define the optional parameter "firefoxProfileTemplate":
just-be-dev commentedon Jul 17, 2015
Is this still an issue?
If so, would you please open a new task?
Thanks!