Skip to content

Instantly share code, notes, and snippets.

var ffoptions = new FirefoxOptions();
ffoptions.AddArgument("--allow-file-access-from-files");
ffoptions.AddArgument("--enable-local-file-accesses ");
ffoptions.SetPreference("browser.startup.homepage", "abcd");
ffoptions.SetPreference("startup.homepage_welcome_url", "abcd");
ffoptions.AddArguments("-profile", "C:/Users/issam/AppData/Roaming/Mozilla/Firefox/Profiles/4bge70ai.default-releaseGGG");
var driverpath = AppDomain.CurrentDomain.BaseDirectory;
FirefoxProfileManager profileManager = new FirefoxProfileManager();
FirefoxProfile profile = profileManager.GetProfile("default-release");
var driverpath = AppDomain.CurrentDomain.BaseDirectory;
profile.SetPreference("browser.startup.homepage", "abcd");
profile.SetPreference("startup.homepage_welcome_url", "abcd");
var ffoptions = new FirefoxOptions();
ffoptions.AddArgument("--no-sandbox");