Skip to content

Instantly share code, notes, and snippets.

@issam1975
Created November 16, 2019 15:57
Show Gist options
  • Save issam1975/092de87ded54c1ffd8e1419a37075e61 to your computer and use it in GitHub Desktop.
Save issam1975/092de87ded54c1ffd8e1419a37075e61 to your computer and use it in GitHub Desktop.
selenium profile 2
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;
using (FirefoxDriver driver = new FirefoxDriver(FirefoxDriverService.CreateDefaultService(driverpath), ffoptions, TimeSpan.FromSeconds(240)))
{
driver.Quit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment