long time lurker here, now it's time for my first real post. I am currently developing a cross browser test for our application with Selenium in .NET.
Following http://www.guru99.com/cross-browser-testing-using-selenium.html, I implemented this:
[SetUpFixture]
public class TestSetup()
{
public static IWebDriver driver;
...
[OneTimeSetUp]
public void GlobalSetup()
{
if(browserToTest.Equals("Firefox"))
{
driver = new FirefoxDriver();
}
else if(browserToTest.Equals("Chrome"))
{
driver = new ChromeDriver();
}
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10.00);
driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(10.00);
// navigate to url, login, etc. pp
}
}
In the "Firefox" case, everything works great. The "Chrome" case - in contrary to the tutorial - gives me this error:
OneTimeSetUp: System.NotImplementedException : Driver instance must comply with the W3C specification to support getting timeout values.
Im using:
- Firefox v54.0
- Chrome v59.0.3071.115
- Selenium.WebDriver v3.4.0
- Selenium.Firefox.WebDriver v0.17.0
- Selenium.WebDriver.ChromeDriver v2.30.0.1
Can I set ImplicitWait and PageLoad for chrome, or is this only implemented for firefox?