Answer the question
In order to leave comments, you need to log in
How to set the correct directory for FirefoxProfile?
FirefoxDriverService ds = FirefoxDriverService.CreateDefaultService();
ds.HideCommandPromptWindow = true;
FirefoxOptions opt = new FirefoxOptions();
opt.Profile = new FirefoxProfile(@"C:\111\");
IWebDriver Wd = new FirefoxDriver(ds, opt);
Answer the question
In order to leave comments, you need to log in
You must first create this profile, and then use it. Run firefox with -P prefix (this must be done when all browser instances are closed)
firefox.exe -P
and create a profile in the desired folder.
And then use this profile in selenium in the way that is described in the question.
//thanks @andrew from stackoverflow
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question