Changing Firefox profiles not working anymore?

33 views
Skip to first unread message

Max

unread,
Sep 24, 2016, 5:44:15 PM9/24/16
to Selenium Users
Hi people,

I'm trying to change the Firefox profile, selecting a FF profile that I created specifically for Selenium Webdriver. I read many examples and it's very simple, three lines of code:

ProfilesIni firefoxProfile1 = new ProfilesIni();
FirefoxProfile seleniumProfile = firefoxProfile1.getProfile("selenium");
WebDriver driver = new FirefoxDriver(seleniumProfile);

When I execute the program, it opens Firefox with the default profile for Selenium (the empty one) and not the one I have configured.

Is this a problem with Geckodriver?
Is this a problem with a FF update?
Is this a Selenium 3.0 problem?

Thanks.

Max

unread,
Sep 24, 2016, 6:15:35 PM9/24/16
to Selenium Users
This is how I solved it - I had to add desired capabilities. Seems like it got more complex lately:

ProfilesIni profiles = new ProfilesIni();
FirefoxProfile seleniumProfile = profiles.getProfile("selenium");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, seleniumProfile);
WebDriver driver = new FirefoxDriver(dc);

Andreas Tolfsen

unread,
Sep 24, 2016, 7:29:33 PM9/24/16
to seleniu...@googlegroups.com, Max
Max <maxiseb...@gmail.com> writes:

> This is how I solved it - I had to add desired capabilities. Seems
> like it got more complex lately:
>
> ProfilesIni profiles = new ProfilesIni();
> FirefoxProfile seleniumProfile = profiles.getProfile("selenium");
> DesiredCapabilities dc = DesiredCapabilities.firefox();
> dc.setCapability(FirefoxDriver.PROFILE, seleniumProfile);
> WebDriver driver = new FirefoxDriver(dc);

That would indicate that something is wrong with the mapping in the
Java binding’s FirefoxDriver ctor trickle-down mapping.
Reply all
Reply to author
Forward
0 new messages