selenium.webdriver.common.timeouts

Classes

Timeouts([implicit_wait, page_load, script])

Create a new Timeouts object.

class selenium.webdriver.common.timeouts.Timeouts(implicit_wait: float = 0, page_load: float = 0, script: float = 0)[source]

Create a new Timeouts object.

This implements https://w3c.github.io/webdriver/#timeouts.

Args:
  • implicit_wait - Either an int or a float. Set how many

    seconds to wait when searching for elements before throwing an error.

  • page_load - Either an int or a float. Set how many seconds

    to wait for a page load to complete before throwing an error.

  • script - Either an int or a float. Set how many seconds to

    wait for an asynchronous script to finish execution before throwing an error.

implicit_wait

Get or set how many seconds to wait when searching for elements.

This does not set the value on the remote end.

Usage

  • Get
    • self.implicit_wait

  • Set
    • self.implicit_wait = value

Parameters

value: float

page_load

Get or set how many seconds to wait for the page to load.

This does not set the value on the remote end.

Usage

  • Get
    • self.page_load

  • Set
    • self.page_load = value

Parameters

value: float

script

Get or set how many seconds to wait for an asynchronous script to finish execution.

This does not set the value on the remote end.

Usage

  • Get
    • self.script

  • Set
    • self.script = value

Parameters

value: float