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
FirefoxDriverFactory overwrites Firefox profile provided by Configuration.browserCapabilities
Details
I was trying to start Firefox with a custom profile with some certificates so the easiest approach was to set Configuration.browserCapabilities = capabilitiesWithFirefoxProfile; . However, when using default Firefox driver provider, profile capability is overwritten in com.codeborne.selenide.webdriver.FirefoxDriverFactory#transferFirefoxProfileFromSystemProperties.
It can be worked around by implementing provider on your own but it's something I'd rather avoid if that is the only reason to implement it :)
Tell us about your environment
Selenide Version: 4.14.2
Firefox version: 62.0
Code To Reproduce Issue
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("security.default_personal_cert", "Select Automatically");
FirefoxOptions firefoxOptions = new FirefoxOptions().setProfile(profile);
Configuration.browser = "firefox";
Configuration.browserCapabilities = new DesiredCapabilities(firefoxOptions);
Selenide.open("https://github.com/codeborne/selenide");
Then navigate to about:config and check security.default_personal_cert property, it should be set to "Select Automatically"
Possible fix
My suggestion would be to load FirefoxProfile from passed FirefoxOptions in com.codeborne.selenide.webdriver.FirefoxDriverFactory#transferFirefoxProfileFromSystemProperties, this would allow to set the profile in code and add another profile preferences from system properties.
The method would look like this:
Change default value for Configuration.browserCapabilities to not null
Fix FirefoxDriverFactory overwrites Firefox profile provided by Configuration issue
The problem
FirefoxDriverFactory overwrites Firefox profile provided by Configuration.browserCapabilities
Details
I was trying to start Firefox with a custom profile with some certificates so the easiest approach was to set
Configuration.browserCapabilities = capabilitiesWithFirefoxProfile;
. However, when using default Firefox driver provider, profile capability is overwritten incom.codeborne.selenide.webdriver.FirefoxDriverFactory#transferFirefoxProfileFromSystemProperties
.It can be worked around by implementing provider on your own but it's something I'd rather avoid if that is the only reason to implement it :)
Tell us about your environment
Code To Reproduce Issue
Then navigate to
about:config
and checksecurity.default_personal_cert
property, it should be set to "Select Automatically"Possible fix
My suggestion would be to load FirefoxProfile from passed
FirefoxOptions
incom.codeborne.selenide.webdriver.FirefoxDriverFactory#transferFirefoxProfileFromSystemProperties
, this would allow to set the profile in code and add another profile preferences from system properties.The method would look like this:
The text was updated successfully, but these errors were encountered: