SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.76k stars 8.02k forks source link

[🐛 Bug]: Setting timeouts in Python #14203

Open titusfortner opened 6 days ago

titusfortner commented 6 days ago

What happened?

This may not be a bug, but it confused me, so probably others as well.

To set implicit wait, page load and script timeouts:

On driver instance: use Timeouts() with keys in snake_case and values in seconds On options instance: use dict with keys in camelCase and values in milliseconds

Should we deprecate Timeouts()? Should we support both?

How can we reproduce the issue?

timeouts = Timeouts(implicit_wait=2, page_load=20)
driver.timeouts = timeouts

and

options = webdriver.ChromeOptions()
options.timeouts = {"implicit": 2000, "pageLoad": 20000}

Relevant log output

n/a

Operating System

n/a

Selenium version

trunk

What are the browser(s) and version(s) where you see this issue?

n/a

What are the browser driver(s) and version(s) where you see this issue?

n/a

Are you using Selenium Grid?

no