Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor configuration of timeouts in Selenium protocol #1101

Closed
jnioche opened this issue Sep 29, 2023 · 1 comment
Closed

Refactor configuration of timeouts in Selenium protocol #1101

jnioche opened this issue Sep 29, 2023 · 1 comment

Comments

@jnioche
Copy link
Contributor

jnioche commented Sep 29, 2023

The configuration of the timeouts is quite error prone.

The default values are set to 0

  selenium.implicitlyWait: 0
  selenium.pageLoadTimeout: 0
  selenium.scriptTimeout: 0

If not set explicitly in the configuration, the default value of 0 is used which leads to a script timeout.

Instead we should it at -1 in the default config so that it is visible for illustration purposes and modify the code so that it is only set if the value is >=0. This would in effect mean: rely on Selenium's default unless specified otherwise, which feels a lot cleaner. It also adds an additional safety as negative values are not accepted.

We will also change the config to use a map, feels a bit cleaner conceptually

  # rely on selenium's default values
  # set to a value >= 0 to override
  selenium.timeouts:
    script: -1
    pageLoad: -1
    implicit: -1
@jnioche
Copy link
Contributor Author

jnioche commented Sep 29, 2023

of course, this is a breaking change and it will be flagged as such in the release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant