-
-
Notifications
You must be signed in to change notification settings - Fork 46
fix: pin browser #447
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
fix: pin browser #447
Conversation
WalkthroughThe pull request updates Chrome WebDriver options in the test setup configuration. Specifically, it revises the remote WebDriver browser version from "127.0" to "128.0" and adds a new setting to use browser version "132" for local instances. Comments have been added to explain these adjustments without altering the core test setup flow. Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
tests/conftest.py (1)
270-270:⚠️ Potential issueFix KeyError in pytest_exception_interact.
The function is trying to access 'session_request' from node.funcargs, but the fixture might not be available for all tests.
- session_request: requests.Session = node.funcargs["session_request"] + session_request: requests.Session = node.funcargs.get("session_request") + if not session_request: + return🧰 Tools
🪛 GitHub Actions: Pre merge test
[error] 270-270: KeyError: 'session_request'. The key 'session_request' was not found in the function arguments.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/conftest.py(2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Pre merge test
tests/conftest.py
[error] 270-270: KeyError: 'session_request'. The key 'session_request' was not found in the function arguments.
🔇 Additional comments (1)
tests/conftest.py (1)
172-173: LGTM! Good addition of Chrome argument.The addition of
disable-search-engine-choice-screenargument is well-documented with a reference to the Selenium blog post about Chrome browser issues.
| # https://aerokube.com/images/latest/#_chrome | ||
| chrome_options.browser_version = "127.0" | ||
| chrome_options.browser_version = "128.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider using dynamic version for remote browser.
Similar to the local browser version, the remote browser version is hardcoded to "128.0".
-# https://aerokube.com/images/latest/#_chrome
-chrome_options.browser_version = "128.0"
+# Use environment variable to allow flexible version configuration
+chrome_options.browser_version = os.getenv("REMOTE_CHROME_VERSION", "latest")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # https://aerokube.com/images/latest/#_chrome | |
| chrome_options.browser_version = "127.0" | |
| chrome_options.browser_version = "128.0" | |
| # Use environment variable to allow flexible version configuration | |
| chrome_options.browser_version = os.getenv("REMOTE_CHROME_VERSION", "latest") |
tests/conftest.py
Outdated
| # https://forum.robotframework.org/t/maximize-window-chromedriver-133/8416/3 | ||
| chrome_options.browser_version("132") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🛠️ Refactor suggestion
🧩 Analysis chain
Verify Chrome browser version compatibility.
The code sets Chrome browser version to "132" for local instances. However, this might cause compatibility issues as Chrome versions are frequently updated.
Consider using a more dynamic approach to handle browser versions:
-# https://forum.robotframework.org/t/maximize-window-chromedriver-133/8416/3
-chrome_options.browser_version("132")
+# Use environment variable to allow flexible version configuration
+chrome_options.browser_version(os.getenv("CHROME_VERSION", "latest"))🌐 Web query:
What is the latest stable version of Chrome browser?
💡 Result:
The latest stable version of Google Chrome is 133.0.6943.98 for Windows and macOS, and 133.0.6943.98 for Linux[1][5]. These versions began rolling out on February 12, 2025[5].
For mobile platforms:
- iOS: Version 133 (133.0.6943.84) was released for iOS devices[1]
- Android: The current Android Stable version aligns with desktop releases at 133 series[1]
Chrome updates follow a staggered rollout process across platforms and regions[1][4]. The browser maintains separate release channels (Stable, Beta, Dev) with different versioning cycles[3]. The current release continues Google's pattern of approximately monthly security updates and quarterly feature-focused releases[3][6].
Citations:
- 1: https://chromereleases.googleblog.com
- 2: https://chromereleases.googleblog.com/2024/
- 3: https://en.wikipedia.org/wiki/Google_Chrome
- 4: https://support.google.com/chrome/a/answer/10314655?hl=en
- 5: https://www.whatismybrowser.com/guides/the-latest-version/chrome
- 6: https://developer.chrome.com/release-notes
- 7: https://chromestatus.com
- 8: https://support.google.com/chrome/a/answer/7679408?hl=en&co=CHROME_ENTERPRISE._Product%3DChromeBrowser
Action Required: Update Chrome Version Handling and Investigate Pipeline Error
-
Chrome Version Configuration:
The tests configuration intests/conftest.py(lines 162–163) currently hardcodes the Chrome browser version as"132". Given the latest stable release is 133.0.6943.98, using"132"may lead to compatibility issues during local tests.
Suggestion: Parameterize the version to allow dynamic configuration. For example:-# https://forum.robotframework.org/t/maximize-window-chromedriver-133/8416/3 -chrome_options.browser_version("132") +# Use environment variable for flexible Chrome version configuration +chrome_options.browser_version(os.getenv("CHROME_VERSION", "latest"))
-
Pipeline Failure Notice:
A KeyError for'session_request'on line 270 has been observed. Please verify that this error is properly addressed, as it could be unrelated to the browser version update.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # https://forum.robotframework.org/t/maximize-window-chromedriver-133/8416/3 | |
| chrome_options.browser_version("132") | |
| # Use environment variable for flexible Chrome version configuration | |
| chrome_options.browser_version(os.getenv("CHROME_VERSION", "latest")) |
Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Summary by CodeRabbit