Skip to content

Should "Set Timeouts" return "invalid argument" for nonintegral values? #1949

@jonathan-j-lee

Description

@jonathan-j-lee

https://www.w3.org/TR/webdriver/#timeouts:

A timeouts configuration is a struct representing the timeouts for script evaluation, navigation, and element retrieval. It has a script timeout item which is an integer or null and is initially set to 30,000, a page load timeout item which is an integer or null and is initially set to 300,000, and an implicit wait timeout item which is an integer or null and is initially set to 0.

... but it seems "deserialize as timeouts configuration" will accept nonintegral numbers. Namely:

Set timeouts to the result of converting a JSON-derived JavaScript value to an Infra value with timeouts.

... will keep numbers as-is, and:

If value is neither null nor a number greater than or equal to 0 and less than or equal to the maximum safe integer return error with error code invalid argument.

The de facto behavior seems to be to return "invalid argument". See test_invalid_value[2.5-*: https://wpt.fyi/results/webdriver/tests/classic/set_timeouts/set.py?label=experimental&label=master&aligned

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions