Cannot find a file named 'D:xxxxxxxxxxxxbinwebdriver_prefs.json' or an embedded resource with the id 'webdriver_preferences.json'.
at OpenQA.Selenium.Internal.ResourceUtilities.GetResourceStream(String fileName, String resourceId)
at OpenQA.Selenium.Firefox.FirefoxProfile.ReadDefaultPreferences()
at OpenQA.Selenium.Firefox.FirefoxProfile..ctor(String profileDirectory, Boolean deleteSourceOnClean)
at OpenQA.Selenium.Firefox.FirefoxProfile..ctor(String profileDirectory)
at OpenQA.Selenium.Firefox.FirefoxProfile..ctor()
A clear and concise description of what the regression is.
-->
Worked up to version: Selenium.WebDriver.4.0.0-alpha01
Stopped working in version: Selenium.WebDriver.4.0.0-alpha02
public void TestFirefoxVersion()
{
FirefoxProfile fp = new FirefoxProfile();
var options = new FirefoxOptions
{
Profile = fp,
BrowserExecutableLocation = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe",
};
IWebDriver driver = new FirefoxDriver("path to gecko", options);
Thread.Sleep(10000);
}
Tried with all latest Gecko versions
OS: Windows 10
Browser: Firefox, FirefoxPortable
Browser version: Firefox 78.0.2
Browser Driver version: GeckoDriver 0.24 -->
Language Bindings C#
Same exception with 4.0.0-alpha05.
Code to reproduce:
FirefoxOptions options = new FirefoxOptions
{
AcceptInsecureCertificates = true,
Profile = new FirefoxProfile(@"path-to-some-existing-profile")
};
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();
service.Host = "::1";
return new FirefoxDriver(service, options, TimeSpan.FromMinutes(3));
It is fine without Profile = new FirefoxProfile(@"path-to-some-existing-profile") line.
Looks to be caused by https://github.com/SeleniumHQ/selenium/commit/9b8758a5bf93a07b76eae637483fd975a228e939
@dtopuzov And already fixed in 67cbd51.
Most helpful comment
@dtopuzov And already fixed in 67cbd51.