I use the C # project settings implicity:
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));
Everything worked. When I installed the new version of selenium-dotnet-3.1.0 my voice this error:
Warning CS0618 'ITimeouts.ImplicitlyWait(TimeSpan)' is obsolete: 'This method will be removed in a future version. Please set the ImplicitWait property instead.'
How to set the global ImplicitlyWait time?
I had the same problem. You can use the following code:
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);
I use Selenium.WebDriver v3.2.0 package (from NuGet), but I can't use ImplicitlyWait property:
RemoteDriver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), _capabilities);
driver = new EventFiringWebDriver(RemoteDriver);
driver.Manage().Timeouts().ImplicitlyWait = TimeSpan.FromSeconds(defaultTimeOut);
returns: Cannot assign to 'ImplicitlyWait' because it is a 'method group'
But driver.Manage().Timeouts().ImplicitlyWait(defaultTimeOut) works well although shows warning about new usage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With