Update to Selenium 4.46.0 - #164
Conversation
Update plugins and dependencies versions. Update DevTools references to v150. Add new signature of method to emulateConditionsByRule with more parameters
WalkthroughUpdates Maven dependencies and plugins, migrates production DevTools imports to newer Selenium protocol packages, adapts network emulation arguments, updates related DevTools tests, and changes browser form synchronization. ChangesDevTools compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java (1)
46-46: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winExercise the service-worker flag independently.
This call passes
isOfflinefor both parameters, so it does not verify thatemulateOfflineServiceWorkeris forwarded independently. Add a case such asoffline=true, emulateOfflineServiceWorker=falseto cover the new API contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java` at line 46, Update the test invoking emulateConditionsByRule in NetworkSpeedEmulationTest so the service-worker argument is exercised independently from isOffline, including a case with offline=true and emulateOfflineServiceWorker=false. Preserve the existing network condition setup while verifying the distinct parameter is forwarded correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java`:
- Line 46: Update the test invoking emulateConditionsByRule in
NetworkSpeedEmulationTest so the service-worker argument is exercised
independently from isOffline, including a case with offline=true and
emulateOfflineServiceWorker=false. Preserve the existing network condition setup
while verifying the distinct parameter is forwarded correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cba1e1e3-c871-439e-b72d-79adef5431ff
📒 Files selected for processing (8)
pom.xmlsrc/main/java/aquality/selenium/browser/devtools/DevToolsHandling.javasrc/main/java/aquality/selenium/browser/devtools/EmulationHandling.javasrc/main/java/aquality/selenium/browser/devtools/JavaScriptHandling.javasrc/main/java/aquality/selenium/browser/devtools/NetworkHandling.javasrc/test/java/tests/usecases/devtools/DeviceEmulationTest.javasrc/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.javasrc/test/java/tests/usecases/devtools/OverrideUserAgentTest.java
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/test/java/manytools/ManyToolsForm.java`:
- Around line 33-36: Update the consent-handling logic in ManyToolsForm.open()
to use bounded waits for lblConsentDialog and btnDecline before clicking, rather
than relying on instantaneous state().isExist() and state().isDisplayed()
checks. Preserve the existing decline click and waitForNotDisplayed behavior
once both elements are available.
In `@src/test/java/manytools/RequestHeadersForm.java`:
- Line 26: Update the readiness check in the RequestHeadersForm header lookup
flow to wait on the form’s stable container state rather than applying
getHeaderValueLabel to the hard-coded “Accept” row. Ensure
getNullableValue(String headerName) can look up arbitrary headers and return
null when a requested row is absent or delayed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e4a4baa2-af9b-45dd-bdfa-a6650266df5c
📒 Files selected for processing (2)
src/test/java/manytools/ManyToolsForm.javasrc/test/java/manytools/RequestHeadersForm.java



Update to Selenium 4.46.0 +semver:feature
Update plugins and dependencies versions.
Update DevTools references to v150.
Add new signature of method to emulateConditionsByRule with more parameters