1

I have an issue using Chrome WebDriver on a Node Webkit Application, when I click an element (it will open two windows at the same time) driver shows a timeout exception on Click function. I tried using ImplictlyWait, SetPageLoadTimeout, but same issue, it timeouts after 60 seconds. Anyone knows how to manage this? Hopefully some of the experts here can help me.

WebDriverWait wait = new WebDriverWait(driver, System.TimeSpan.FromSeconds(30));

var button = driver.FindElement(By.Id("okButton"));

driver.Manage().Timeouts().ImplicitlyWait(System.TimeSpan.FromSeconds(30));
driver.Manage().Timeouts().SetPageLoadTimeout(System.TimeSpan.FromSeconds(30));
driver.Manage().Timeouts().SetScriptTimeout(System.TimeSpan.FromSeconds(30));

button.Click();

After click is when TimeOut occurs in driver and I cannot read Current Window nor WindowHandles in driver.

Stacktrace: at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)

Message: The HTTP request to the remote WebDriver server for URL http://localhost:56188/session/ef3f1d1e01cefdb22aa178da23dfcd88/element timed out after 60 seconds.

6
  • 1
    Can you post more information? Screenshot? Stack trace? Also, which language bindings is this? C#?
    – Julian
    Commented Jan 19, 2016 at 19:56
  • I edited my question, the thing is that the application hangs after the click, apparently the driver timeouts after the click) since no information such as windows handles is no further available. I cannot post images, but the app hangs one of the windows that's supposed to show doesn't the other does and there are two more (total of four). Thanks.
    – j.rmz87
    Commented Jan 19, 2016 at 21:40
  • So, to clarify. The click is performed and registered by the app. Two windows open in response to the click and webdriver proceeds to hang until it times out. I also notice that you declare a WebDriverWait, but do not use it. Have you tried using that instead of setting implicit webdriver timeouts?
    – Julian
    Commented Jan 20, 2016 at 6:19
  • i understood your question clearly , when you click on button it opens two new windows right? then use driver.navigate command and pass the url of that New windows hopefully it might work. Commented Jan 20, 2016 at 12:59
  • I do not have the URL available since it's developed on Node WebKit and yes, two simultaneous windows are opened after the click and then the application hangs and driver timeouts. @JulianCleary
    – j.rmz87
    Commented Jan 20, 2016 at 21:49

1 Answer 1

3

This is super odd, in terms of your code though, everything looks correct. the problem does not seem to be on your end. If you call the click method, and selenium times out AFTER the browser performs that click, then the problem is likely with the return trip from the browser's embedded http server that your tests communicate with.

Your stack trace also seems to suggest this considering that the method which is failing appears to be the one that processes the response which tells your test whether that click action succeeded or not.

Are you using the latest version of chrome, and are you also using the latest version of chromedriver? If one of the two had an upgrade recently then that could be throwing you for a spin.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.