Skip to content

Add API to set page load timeout #1535

Closed
@0xLeon

Description

@0xLeon

Today, I stumbled upon the lack of ability to set the page load timeout defined by the W3C WebDriver standard [1]. The underlying Python Selenium implementation does provide a corresponding set_page_load_timeout method in selenium.webdriver.remote.webdriver.WebDriver [2].

Too me, it is not completely clear how this should be handled on the library level. SeleniumLibrary currently has two kinds of timeouts. The library timeout is both the library-own default timeout for the waiting keywords as well as the script timeout from the WebDriver standard. The implicit wait timeout is only a direct pass-through to the implicit wait timeout from the WebDriver standard. I don't know exactly why the WebDriver standard has a separate page load timeout, but it should be exposed on the library level as well, I think.

The question is, should SeleniumLibrary just use the existing library-level timeout for the page load timeout as well? This would mean that you basically loose the separation on the WebDriver level and have a single configuration parameter for script timeout and page load timeout.
The other solution would be to add another set of parameters and keywords for the page load timeout itself. This way, the separation from the WebDriver level is also exposed on the library level. But it would probably mean an API-breaking change is necessary, adding another parameter to the library __init__ as well as some more keywords specifically for the page load timeout.

[1] https://w3c.github.io/webdriver/#timeouts
[2] https://github.com/SeleniumHQ/selenium/blob/5d0099de8401c3e5b58f58bd227c46d95da7c8a7/py/selenium/webdriver/remote/webdriver.py#L967

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions