Questions tagged [setscripttimeout]

setScriptTimeout() sets the amount of time to wait for an asynchronous script to finish execution before throwing an error.

setScriptTimeout()

setScriptTimeout() sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely.

Implementation

  • Java:

    driver.manage().timeouts().setScriptTimeout(30, TimeUnit.SECONDS);
    
  • Python:

    driver.set_script_timeout(30)
    
2 questions
5
votes
1 answer

What does Selenium .set_script_timeout(n) do and how is it different from driver.set_page_load_timeout(n)?

In context of python selenium, I don't quite understand the exact difference of driver.set_page_load_timeout(n) VS. driver.set_script_timeout(n). Both seem to be used interchangeable to set a timeout to load an URL via driver.get(URL), but sometimes…
sudonym
  • 3,788
  • 4
  • 36
  • 61
0
votes
1 answer

script time out with executeAsyncScript() for fetch post call

I am trying to run a script using executeAsyncScript() method having a fetch call. since fetch call returns a promise, hence on console it is taking some time to fulfill the promise but using selenium java script executer it is throwing error saying…