1

I am using selenium(C#) MBUnit framework.

I have put Thread.Sleep(60000) statement in my test.

While executing above statement using Gallio Icarus, I am getting below exception.

element timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out

What is the default timeout between two selenium commands in MBUnit?

Eduardo Briguenti Vieira
  • 4,351
  • 3
  • 37
  • 49

1 Answers1

0

There are three different settings for timeouts I know of... ImplicitWait, PageLoadTimeout, and ScriptTimeout.

  • ImplicitWait tells the browser how long to look for an element before quitting.

  • ScriptTimeout is how long a script should run before quitting.

  • PageLoadTimeout, is well, how long we should let a page load before timing out.

My guess is that the ScriptTimeout is getting exceeded. Try running the following code before your sleep statement.

Driver.Manage().Timeouts.SetScriptTimeout(new TimeSpan(0, 0, 70, 0)) ; 
Driver.Manage().Timeouts.SetPageLoadTimeout(new TimeSpan(0, 0, 70, 0)) ; 

If you have any background request going that might make Selenium think there is an ongoing operation (AJAX?) try setting the ImplicitWait higher also.

FatAdama
  • 91
  • 2
  • 11