Skip to content

Conversation

yvsvarma
Copy link
Contributor

@yvsvarma yvsvarma commented Oct 15, 2025

User description

Summary
This switches the Python Remote tests from Firefox to Chrome and updates CI to match. It also makes the Remote tests honor both Chrome- and Remote-specific xfail markers. Fixes #16417.

What changed
py/conftest.py

  • Remote now uses Chrome options (with managed downloads).
  • Remote respects both xfail_chrome and xfail_remote.
  • The Grid server is started via the bundled Server helper, and we don’t try to start a new one if it’s already running.

.github/workflows/ci-python.yml
Remote test job runs with browser: chrome.

Rakefile
Description updated to “Python Remote tests with Chrome”.

Why
We want Python Remote tests to run on Chrome by default and ensure CI does the same.

How I tested
On macOS with Bazel:

  • Ran: bazel test --cache_test_results=no --local_test_jobs 1 --flaky_test_attempts 1 --test_output=errors //py:test-remote
  • Got: 52/52 passing.
  • Selenium Grid used Selenium Manager and matched Chrome/ChromeDriver 141.0.7390.78.

Impact
Only affects Python Remote tests and the Python CI workflow. No changes to other bindings or local driver tests.


PR Type

Tests, Enhancement


Description

  • Switch Python Remote tests from Firefox to Chrome

  • Update CI workflow to run Remote tests with Chrome browser

  • Add support for dual xfail markers (Chrome and Remote) in Remote test configuration

  • Configure Remote driver with Chrome options and managed downloads


Diagram Walkthrough

flowchart LR
  A["Remote Tests"] --> B["Chrome Options"]
  A --> C["CI Workflow"]
  A --> D["xfail Markers"]
  B --> E["Managed Downloads"]
  D --> F["xfail_chrome"]
  D --> G["xfail_remote"]
Loading

File Walkthrough

Relevant files
Enhancement
conftest.py
Switch Remote driver to Chrome with dual marker support   

py/conftest.py

  • Changed Remote driver from FirefoxOptions to ChromeOptions
  • Added dual xfail marker support for Remote tests (both xfail_chrome
    and xfail_remote)
  • Updated marker detection logic to check multiple marker names for
    Remote driver
+13/-2   
Configuration changes
ci-python.yml
Update CI workflow to use Chrome for Remote tests               

.github/workflows/ci-python.yml

  • Updated Remote tests matrix browser from firefox to chrome
+1/-1     
Documentation
Rakefile
Update Rake task description for Chrome                                   

Rakefile

  • Updated task description from "Python Remote tests with Firefox" to
    "Python Remote tests with Chrome"
+1/-1     

@selenium-ci selenium-ci added C-py Python Bindings B-build Includes scripting, bazel and CI integrations labels Oct 15, 2025
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Test masking risk

Description: Test flow can be conditionally altered by xfail markers like 'xfail_chrome' and
'xfail_remote', which if misused could unintentionally skip or mask failures; ensure
marker usage is restricted to test code and not user input.
conftest.py [332-341]

Referred Code
    marker_names = ["xfail_chrome", "xfail_remote"]
else:
    marker_names = [f"xfail_{driver_class.lower()}"]

marker = None
for name in marker_names:
    found = request.node.get_closest_marker(name)
    if found is not None:
        marker = found
        break
Ticket Compliance
🎫 No ticket provided
- [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true -->

</details></td></tr>
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Prioritize more specific xfail marker

For remote tests, prioritize the xfail_remote marker over xfail_chrome by
reordering them in the marker_names list to provide more specific failure
context.

py/conftest.py [331-334]

 if driver_class == "remote":
-    marker_names = ["xfail_chrome", "xfail_remote"]
+    marker_names = ["xfail_remote", "xfail_chrome"]
 else:
     marker_names = [f"xfail_{driver_class.lower()}"]
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out a logical flaw in the marker prioritization for remote tests and proposes a simple fix that improves the specificity and clarity of test failure reporting.

Low
  • More

@VietND96 VietND96 requested a review from cgoldberg October 15, 2025 08:09
@navin772
Copy link
Member

I think this is already being resolved in #16419

@cgoldberg
Copy link
Member

@yvsvarma thanks, but I already have a PR for this: #16419

@cgoldberg cgoldberg closed this Oct 15, 2025
@yvsvarma
Copy link
Contributor Author

@yvsvarma thanks, but I already have a PR for this: #16419

👍🏻 Sure. Thanks Corey!

@yvsvarma yvsvarma deleted the feat/py-remote-chrome-16417 branch October 15, 2025 13:38
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

4 participants