-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update examples test Chrome/Edge run on Ubuntu 24.04 hosted runners #2139
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
✅ Deploy Preview for selenium-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Viet Nguyen Duc <[email protected]>
@harsha509, I saw Js examples test run on Ubuntu with few cases are failing the same. Do you want to add arg |
User description
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
Description
Recently, GitHub updated ubuntu-latest from 22.04 to 24.04.
In this update, it looks like Chrome/Edge didn't wrap with
--no-sandbox
by default anymore.Which causes the error
Refer to an explanation https://stackoverflow.com/questions/70385737/selenium-common-exceptions-invalidargumentexception-message-invalid-argument
Update ChromeOptions/EdgeOptions always append argument
--no-sandbox
when creating WebDriver looks like a solution till now. It makes CI is green back.Motivation and Context
Types of changes
Checklist
PR Type
Bug fix, Tests
Description
Added
--no-sandbox
argument to Chrome and Edge options to resolve browser initialization issues on Ubuntu 24.04.Introduced
get_default_options
utility functions for Chrome and Edge in Python and Java tests.Updated all relevant test cases to use the new default options functions.
Enhanced test reliability and compatibility with updated GitHub Actions runners.
Changes walkthrough 📝
16 files
Refactored Chrome tests to use `get_default_options`
Refactored Edge tests to use `get_default_options`
Added `--no-sandbox` to Chrome options in fixtures
Refactored HTTP client tests to use `get_default_options`
Refactored options tests to use `get_default_options`
Refactored remote WebDriver tests to use `get_default_options`
Refactored service tests to use `get_default_options`
Updated CDP API test to use default Chrome options
Refactored Chrome browser tests to use default options
Refactored Edge browser tests to use default options
Updated HTTP client tests to use default Chrome options
Refactored options tests to use default Chrome options
Updated remote WebDriver tests to use default Chrome options
Refactored service tests to use default Chrome options
Updated alerts test to use default Chrome options
Updated prints page test to use default Chrome options
1 files
Added utility methods for default Chrome and Edge options