where can i set the default timeout

105 views
Skip to first unread message

Sabrina Kraschl

unread,
Jun 29, 2021, 11:57:41 PM6/29/21
to Selenium Users
Hello, 
where can i set the default timeout in Microsoft edge feature extension selenium. 
i am using this version for microsoft edge: 

  • Selenium IDE
  • Size: 16.3 MB
  • Size16.3 MB
  • Version: 3 . 1 7 . 0
  • Version3.17.0


my tests always fails with this error:

.Trying to find css=.mx-sb-medium-quick-link-without-description:nth-child(1) .darker-background... Failed:15:42:20
Implicit Wait timed out after 30000ms

cause it took more than 30 seconds.
many thanks. br, sabrina

Serguei Kouzmine

unread,
Jun 30, 2021, 12:15:24 AM6/30/21
to Selenium Users

half a minute is quite a wait. has you checked that the locator is valid ?
to set defaut timeouts,  please try
```
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
```

Sabrina Kraschl

unread,
Jun 30, 2021, 4:01:56 AM6/30/21
to seleniu...@googlegroups.com
hello, yes it is valid. sometime it is working and sometime it is not working because it is taking more than 30 seconds depending on the input values. 
i am using the microsoft edge extensions (addon) where can i set this:driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
thanks br, sabrina


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2632e70b-c185-47eb-b5af-ba8b0d36440dn%40googlegroups.com.

prave...@gmail.com

unread,
Jun 30, 2021, 6:50:31 AM6/30/21
to Selenium Users
I've never used selenium IDE but I can give you some important details so that you can figure out and fix it yourself.

Error says 'Implicit Wait timed out after 30000ms'. Selenium has two types of waits, implicit and explicit.

When implicit waiting is enabled, every time you find an element, selenium always waits for a certain time until the element is found. If it can't find an element by the given selector, a timeout error is thrown. There must be some option to set implicit timeout in selenium IDE that you've to find yourself by exploring its documentation. For example you can set it to 60 * 1000.

When implicit wait is disabled, selenium doesn't wait when an element needs to be found, i.e if its not readily on the page, an element not found error is thrown. If you want to wait (for example when you know element will be rendered on page after a delay), you will have to apply explicit wait. Find in selenium IDE docs how to put a manual wait.

From what I see, your element is being rendered after a delay as the implicit wait of 30sec sometimes work for you and sometimes do not. I suggest you disable implicit wait rather than increasing it because if you increase it, it will be same for every element you search. Rather, put a manual wait whenever you think the element you're finding won't be readily available. You could also create a function that waits until the desired element is found and invoke it only when you need to.

PS: I am the founder of Zylitics, an end to end testing platform for web apps that makes it extremely easy to write, run and debug tests right from a web browser. It has solid capabilities for waiting, hundreds of manual wait built-in operations, and it automatically waits whenever required (which is overridable in each operation). It needs no configuration and installations. Everything you need is available out of the box, be it different OS`s, browsers, live preview, code management, test assets management and everything in between. It is based on selenium/webdriver but uses a new and extremely easy to use and learn language. https://zylitics.io
Reply all
Reply to author
Forward
0 new messages