Skip to content

Conversation

cgoldberg
Copy link
Member

@cgoldberg cgoldberg commented Oct 13, 2025

User description

🔗 Related Issues

Fixes #16417

💥 What does this PR do?

This PR updates the internal Python test suite and CI job to use Chrome instead of Firefox for Remote tests.

This also updates the driver fixture to cleanup downloaded files between tests if running a Remote WebDriver so we don't leak between tests if we don't close the browser.

🔄 Types of changes

  • Test/CI

PR Type

Tests


Description

  • Switch Remote WebDriver tests from Firefox to Chrome

  • Update test fixtures to use chromium_options instead of firefox_options

  • Modify CI workflow to run remote tests with Chrome browser

  • Change default Remote options configuration from Firefox to Chrome


Diagram Walkthrough

flowchart LR
  A["conftest.py"] -- "Update default options" --> B["Remote: Firefox → Chrome"]
  C["remote_connection_tests.py"] -- "Replace fixtures" --> D["chromium_options"]
  E["remote_custom_locator_tests.py"] -- "Replace fixtures" --> D
  F[".github/workflows/ci-python.yml"] -- "Update CI" --> G["browser: chrome"]
Loading

File Walkthrough

Relevant files
Configuration changes
conftest.py
Update Remote driver default options to Chrome                     

py/conftest.py

  • Changed remote driver default options from FirefoxOptions to
    ChromeOptions
  • Updated Remote driver initialization to use Chrome capabilities
    (goog:chromeOptions)
  • Removed Firefox-specific Wayland environment configuration for Remote
    driver
+3/-3     
ci-python.yml
Switch CI remote tests to Chrome browser                                 

.github/workflows/ci-python.yml

  • Updated CI workflow matrix to use chrome instead of firefox for remote
    tests
+1/-1     
Tests
remote_connection_tests.py
Switch Remote test fixtures from Firefox to Chrome             

py/test/selenium/webdriver/remote/remote_connection_tests.py

  • Replaced firefox_options fixture with chromium_options in timeout
    tests
  • Moved Firefox-specific screenshot test to use explicit Firefox options
  • Updated BiDi test to use Chrome options instead of Firefox
+13/-11 
remote_custom_locator_tests.py
Update custom locator test to use Chrome options                 

py/test/selenium/webdriver/remote/remote_custom_locator_tests.py

  • Changed custom locator driver fixture from firefox_options to
    chromium_options
+2/-2     

@cgoldberg cgoldberg added C-py Python Bindings B-build Includes scripting, bazel and CI integrations labels Oct 13, 2025
@cgoldberg
Copy link
Member Author

I found the weirdest Chrome issue while working on this PR. Any file the test tries to download gets downloaded as an *.html file instead of the correct file extension. I can't reproduce it when manually launching the same browser... but when driven by chromedriver, it renames the files (like file_1.txt downloads as file_1.html).

I have the tests altered to compensate for this, but I have no idea what is going on.

@SeleniumHQ SeleniumHQ deleted a comment from qodo-merge-pro bot Oct 15, 2025
@SeleniumHQ SeleniumHQ deleted a comment from qodo-merge-pro bot Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations C-py Python Bindings Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🚀 Feature]: [py] Update Remote tests to use Chrome instead of Firefox

3 participants