Skip to content

Change flag for Chrome/Edge headless mode in tests #15831

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

Merged

Conversation

cgoldberg
Copy link
Contributor

@cgoldberg cgoldberg commented May 30, 2025

User description

💥 What does this PR do?

This PR changes the flag for setting headless mode in Chrome/Edge from --headless=new to --headless in places where it was used in internal tests.

Since Chrome 132, "new" headless mode is the default and --headless=new will eventually be removed.

We should probably update the docs to mention this. Specifically:

🔄 Types of changes

  • internal testing

PR Type

Tests


Description

  • Update headless flag to --headless for Chrome/Edge tests

  • Remove deprecated --headless=new usage in test code

  • Ensure compatibility with Chrome 132+ headless mode changes


Changes walkthrough 📝

Relevant files
Tests
EdgeDriverFunctionalTest.java
Update Edge headless flag in functional test                         

java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java

  • Changed Edge headless mode argument from --headless=new to --headless
    in test.
  • +1/-1     
    Browser.java
    Update headless flag for Chrome/Edge in driver options     

    java/test/org/openqa/selenium/testing/drivers/Browser.java

  • Changed ChromeOptions and EdgeOptions headless argument from
    --headless=new to --headless.
  • +2/-2     
    conftest.py
    Use `--headless` for Chrome/Edge in Python test config     

    py/conftest.py

  • Updated headless argument for Chrome/Edge from --headless=new to
    --headless in test setup.
  • +2/-2     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added C-py Python Bindings C-java Java Bindings labels May 30, 2025
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @cgoldberg cgoldberg merged commit 36bd191 into SeleniumHQ:trunk May 30, 2025
    22 checks passed
    @cgoldberg cgoldberg deleted the change-headless-flag-for-tests branch May 30, 2025 19:14
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    C-java Java Bindings C-py Python Bindings Review effort 1/5
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants