Skip to content

Basic Authentication in Firefox from within robotframework  #164

Description

@DJoeri

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions