While creating my test using c# and selenium I ran into a issue I haven't had before. The test basically opens the web site, logs in as admin, and within the admin page I than have to install a plugin for this site that allows warranties feature to be enabled on the website. Everything so far works, but when the test clicks the install button, the page goes into a installing/loading type of screen and then after a min my test fails because of time limits. This this the error:

Message: OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:59515/session/c098338553dd7e3941e7e6c800273df3/element/0.3693091767590764-2/click timed out after 60 seconds. ----> System.Net.WebException : The operation has timed out.

Now the test does install the plugin as it supposed to but my test will still fail and I can not continue with the rest of the test because of this time out. I know it has to do with webdriver or remotedriver that has the default timer set to 60 seconds, but I just don't know how to go around and either extending that time limit or if there is another way to go about this?

  • you can use Explicit wait for this or if you know that how much time it will take in complete installation then you can use Thread.sleep(enter-your-milliseconds); – Upkar Singh May 6 '19 at 11:00
  • i have already tried this. on the next line of code after it clicks the install button, i have it logout of admin and i used "new WebDriver(_driver, TimeSpan.FromSeconds(300)).Until(ExpectedConditions.ElementExists(By.Id("search-plugins-local"))); " . and i still get the WebDriver server for URL"" timed out after 60 seconds. – Chrisaldo Fundora May 6 '19 at 16:15
  • try using this- new WebDriverWait(_driver, TimeSpan.FromMinutes(3)) .Until(ExpectedConditions.ElementIsVisible(By.Id("search-plugins-loca"))); – Upkar Singh May 7 '19 at 4:24
  • no that wont work. see the issue is not that the test is trying to go to the next line of code but cant find the element because the plugin is still installing, this is not the problem. the problem is that once the button is clicked and the install starts, the test fails within that same line of code of clicking the install button and times out. someone mention to try a catch block around the click action to handle the javascript. but i dont know how to implement it so im researching it right now. – Chrisaldo Fundora May 8 '19 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.