[webkit-changes] [WebKit/WebKit] 9a82bd: [WebDriver][BiDi] run-webdriver-tests: Selenium We...

Lauro Moura noreply at github.com
Tue Jan 28 08:31:39 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9a82bd160050b56ded81f734698f1c79ee4fae94
      https://github.com/WebKit/WebKit/commit/9a82bd160050b56ded81f734698f1c79ee4fae94
  Author: Lauro Moura <lmoura at igalia.com>
  Date:   2025-01-28 (Tue, 28 Jan 2025)

  Changed paths:
    M Tools/Scripts/run-webdriver-tests
    M Tools/Scripts/webkitpy/webdriver_tests/pytest_runner.py
    M Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py
    M Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py
    M WebDriverTests/TestExpectations.json

  Log Message:
  -----------
  [WebDriver][BiDi] run-webdriver-tests: Selenium WebDriver-BiDi tests require extra pytest option
https://bugs.webkit.org/show_bug.cgi?id=286497

Reviewed by Carlos Alberto Lopez Perez.

Add a `--enable-webdriver-bidi` flag to `run-webdriver-tests`. It'll
forward the required `--bidi=1` to Selenium's pytest.

Given the plans to control WebDriver-BiDi support behind a feature flag
(bug283517), we skipped trying to figure out whether the build supports
it, opting for a more explicit approach.

During work on this issue, we found a limitation related to a 10-year old
argparse issue[1], which leads to pytest's failing to load the right
config files[2], which in turn might make it fail to recognize custom
CLI switches added by the expected conftest.py. This happens, for
example, with `--browser-args` if it receives a space-separated list,
as we currently do. So this commit also adds a check for pytest's
`ExitCode.USAGE_ERROR` when calling `pytest.main` for clarity.

In a follow-up commit, we'll update the buildbot WebDriver steps to use
the new `--enable-webdriver-bidi` in `run-webdriver-tests`.

Also update some expectations based on recent WebDriver-BiDi commits.

[1] https://github.com/python/cpython/issues/66623
[2] https://github.com/pytest-dev/pytest/issues/9749

* Tools/Scripts/run-webdriver-tests:
* Tools/Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(run):
* Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.__init__):
* Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
(WebDriverTestRunnerSelenium.collect_tests):
(WebDriverTestRunnerSelenium.run):
* WebDriverTests/TestExpectations.json:

Canonical link: https://commits.webkit.org/289454@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list