w3c / w3c/webdriver

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

Open
#1,949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Set Timeouts
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebDriver Set Timeouts and “deserialize as timeouts configuration” sections cited in the issue, then compare their wording with test_invalid_value[2.5-* in webdriver/tests/classic/set_timeouts/set.py. Done means resolving whether nonintegral timeout values must return “invalid argument” and clarifying the specification accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.