Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium WebDriver throws WebDriverTimeoutException on RemoteWebElement.Click()

I have an error with clicks that hard to reproduce. 1-2/10000 clicks ends with OpenQA.Selenium.WebDriverTimeoutException. It looks like element was not clicked and driver waits for some reaction.

Message: timeout: cannot determine loading status
from timeout: Timed out receiving message from renderer: -0.028
  (Session info: chrome=52.0.2743.116)
  (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.3.9600 x86_64)
Stack trace:
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebElement.Click()

Sometimes Timeout in exception message looks legit (300 seconds), but in most cases it has negative value like -0.028.

I use:

Chrome 52.0.2743.116
Selenium 2.53.1
ChromeDriver 2.23 (also produces with 2.22)

Update:

I start getting this error also on RemoteNavigator.GoToUrl

Type: OpenQA.Selenium.WebDriverTimeoutException
Message: timeout: cannot determine loading status
from timeout: Timed out receiving message from renderer: -0.032
  (Session info: chrome=52.0.2743.116)
  (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.3.9600 x86_64)
Stack trace:
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.set_Url(String value)
   at OpenQA.Selenium.Remote.RemoteNavigator.GoToUrl(String url)
like image 617
Kovpaev Alexey Avatar asked Aug 30 '16 13:08

Kovpaev Alexey


1 Answers

Little peak into the Selenium source code will reveal that every action on the WebElement or infact any Selenium interaction will invoke execute(String driverCommand, Map<String, ?> parameters) of RemoteWebDriver class

This will execute command through the CommandExecutor Interface which is implemented by different drivers

ChromeDriver also implements this and you are seeing this error due to a bug which chromium team is aware and is working on. please check the bug details here.

The error rate has come down with Chromedriver v2.23 but its still occurring but rarely

Bug#1362

Bug#817

Bug#1224

like image 67
AdityaReddy Avatar answered Nov 02 '22 06:11

AdityaReddy