fysh711426 / UndetectedChromeDriver

GNU General Public License v3.0
166 stars 61 forks source link

reload chrome #14

Open mahdisky opened 2 years ago

mahdisky commented 2 years ago

hi how to reload again after initializing?

_driver.Dispose(); and again UndetectedChromeDriver.Create when I add "options" but not work

fysh711426 commented 2 years ago

Options cannot be shared.

Try it.

var createOptions = () =>
{
    var options = new ChromeOptions();
    ...
    return options;
};

var driver = UndetectedChromeDriver.Create(
    options: createOptions(),
    driverExecutablePath: driverExecutablePath);
driver.GoToUrl("https://nowsecure.nl");
driver.Dispose();

driver = UndetectedChromeDriver.Create(
    options: createOptions(),
    driverExecutablePath: driverExecutablePath);
driver.GoToUrl("https://nowsecure.nl");
driver.Dispose();