How to add profile specification in FirefoxDriverService in C # Selenium?

Context: Azure, C #, ClearScript, Selenium, Firefox

I host Selenium Firefox characters in ClearScript JavaScript. In the following JavaScript code, characters exposed / exported from C # have the CS prefix.

// Preamble_LaunchBrowser.js
driverService = CSFirefoxDriverService.CreateDefaultService();
driverService.FirefoxBinaryPath = "C:\\Program Files\\Mozilla Firefox\\firefox.exe";
driverService.HideCommandPromptWindow = true;
driverService.SuppressInitialDiagnosticInformation = true;
var options = new CSFirefoxOptions();
driver = new CSFirefoxDriver(driverService, options, CSTimeSpan.FromSeconds(10));
driver.Url = "http://www.google.com.au/";

I currently do not have profile support, but I would like to add them somehow. How to specify a profile in the context of FirefoxDriverService?

+4
source share
1 answer

I currently do not have profile support, but I would like to add them somehow. How to specify a profile in the context of FirefoxDriverService?

Forgive me if I miss the point.

Just start FireFox using this command line firefox.exe -pto create a new profile.

, javascript, FireFox .

+1

Source: https://habr.com/ru/post/1657020/


All Articles