public static void StartBrowser()

in csharp-selenium-webdriver-sample/SamplePageTests.cs [138:150]


        public static void StartBrowser(TestContext testContext) {
            // WebDriverFactory uses environment variables set by azure-pipelines.yml to determine which browser to use;
            // the test cases we'll write in this file will work regardless of which browser they're running against.
            //
            // This WebDriverFactory is just one example of how you might initialize Selenium; if you're adding Selenium.Axe
            // to an existing set of end to end tests that already have their own way of initializing a webdriver, you can
            // keep using that instead.
            _webDriver = WebDriverFactory.CreateFromEnvironmentVariableSettings();

            // You *must* set this timeout to use Selenium.Axe. It defaults to "0 seconds", which isn't enough time for
            // Axe to scan the page. The exact amount of time will depend on the complexity of the page you're testing.
            _webDriver.Manage().Timeouts().AsynchronousJavaScript = TimeSpan.FromSeconds(20);
        }