Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97792

Selenium PageLoad is never set [duplicate]

$
0
0

I've been trying to set a 3 minute timeout instead of the default 60 seconds. It seems this should be correct according to the documentation I've seen. Any help is appreciated!

This runs first

    public void BeforeScenario1()

            Driver = CreateDriver();
            Driver.Manage().Timeouts().PageLoad = TimeSpan.FromMinutes(3);
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMinutes(3);
            Driver.Manage().Window.Position = new System.Drawing.Point(0, 0);
            Driver.Manage().Window.Maximize();
    }

The CreateDriver() method just adds the chrome arguments, I'm trying to set the timeout value in the method above.

private static ChromeOptions GetChromeOptions()
        {
            var chromeOptions = new ChromeOptions();
            chromeOptions.AddArgument("no-sandbox");
            chromeOptions.AddUserProfilePreference("download.default_directory", Config.TempPath);
            chromeOptions.AddUserProfilePreference("download.prompt_for_download", false);
            chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");


            if (Config.IsHeadless)
            {
                chromeOptions.AddArgument("headless");
            }
            chromeOptions.AddArgument("--disable-dev-shm-usage");
            chromeOptions.AddArgument("proxy-server='direct://'");
            chromeOptions.AddArgument("proxy-bypass-list=*");
            chromeOptions.SetLoggingPreference(LogType.Browser, Config.BrowserErrorLoggingType);
            return chromeOptions;
        }

Viewing all articles
Browse latest Browse all 97792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>