Reputation: 29
I am trying to set the implicit wait using ChomeDriver and Selenium, but I am getting an error message.
The behavior is also that the timeout does not get set and defaults to 60 seconds.
Driver instance must comply with the W3C specification to support getting timeout values.
at OpenQA.Selenium.Remote.RemoteTimeouts.ExecuteGetTimeout(String timeoutType)\r\n at OpenQA.Selenium.Remote.RemoteTimeouts.get_ImplicitWait()"
I am using Selenium.WebDriver 3.141.0
Upvotes: 0
Views: 1220
Reputation: 193088
This error message...
OpenQA.Selenium.Remote.RemoteTimeouts.ExecuteGetTimeout(String timeoutType)\r\n at OpenQA.Selenium.Remote.RemoteTimeouts.get_ImplicitWait()
...implies that the syntax used for inducing ImplicitWait was not proper.
As per the discussion in Support W3C WebDriver Set Timeouts format earlier the Set Timeouts command expected the data format as follows:
{
implicit: 59,
}
But as per the W3C WebDriver multiple timeout durations can be set at the same time as follows:
{
implicit: 123,
pageLoad: 234,
script: 456,
}
Your code trials would have helped us to debug your issue in a better way. Perhaps you are inducing ImplicitWait as per the earlier format:
driver.Manage().Timeouts().ImplicitWait = waitTime;
Hence you see the error.
To induce ImplicitWait you need to follow the following format:
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
Upvotes: 1