Skip to content

Update to Selenium 4.46.0 - #164

Merged
mialeska merged 2 commits into
masterfrom
enhancement/update-to-selenium-4.46.0
Jul 29, 2026
Merged

Update to Selenium 4.46.0 #164
mialeska merged 2 commits into
masterfrom
enhancement/update-to-selenium-4.46.0

Conversation

@mialeska

Copy link
Copy Markdown
Contributor

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

Update plugins and dependencies versions.
Update DevTools references to v150.
Add new signature of method to emulateConditionsByRule with more parameters
@mialeska mialeska self-assigned this Jul 29, 2026
@mialeska mialeska added the enhancement New feature or request label Jul 29, 2026
@mialeska mialeska added feature dependencies Pull requests that update a dependency file java labels Jul 29, 2026
@github-project-automation github-project-automation Bot moved this to In progress in Aquality Selenium Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Updates 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.

Changes

DevTools compatibility

Layer / File(s) Summary
Dependency and DevTools binding alignment
pom.xml, src/main/java/aquality/selenium/browser/devtools/*
Maven dependencies and plugins are upgraded, while performance, emulation, JavaScript, and related DevTools imports move to newer protocol packages.
Network emulation API adaptation
src/main/java/aquality/selenium/browser/devtools/NetworkHandling.java, src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java
Network emulation forwards optional flags through the updated Selenium API, and tests use the revised models, constructors, and overload.
Emulation test binding updates
src/test/java/tests/usecases/devtools/DeviceEmulationTest.java, src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java
Device emulation and user-agent tests switch to newer Selenium emulation packages.
Browser form synchronization updates
src/test/java/manytools/ManyToolsForm.java, src/test/java/manytools/RequestHeadersForm.java
Form tests add cookie-consent handling, navigation and element-state waits, and a targeted header-value wait.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A bunny hops through v150 air,
With optional flags tucked with care.
New imports bloom, tests follow through,
Maven tools wear versions new.
Cookie clouds fade—what a view! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: upgrading Selenium and related DevTools support.
Description check ✅ Passed The description is directly related to the changeset and mentions the dependency, DevTools, and method signature updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enhancement/update-to-selenium-4.46.0

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java (1)

46-46: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise the service-worker flag independently.

This call passes isOffline for both parameters, so it does not verify that emulateOfflineServiceWorker is forwarded independently. Add a case such as offline=true, emulateOfflineServiceWorker=false to 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

📥 Commits

Reviewing files that changed from the base of the PR and between e1a93c4 and 0391d22.

📒 Files selected for processing (8)
  • pom.xml
  • src/main/java/aquality/selenium/browser/devtools/DevToolsHandling.java
  • src/main/java/aquality/selenium/browser/devtools/EmulationHandling.java
  • src/main/java/aquality/selenium/browser/devtools/JavaScriptHandling.java
  • src/main/java/aquality/selenium/browser/devtools/NetworkHandling.java
  • src/test/java/tests/usecases/devtools/DeviceEmulationTest.java
  • src/test/java/tests/usecases/devtools/NetworkSpeedEmulationTest.java
  • src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0391d22 and d4e3abb.

📒 Files selected for processing (2)
  • src/test/java/manytools/ManyToolsForm.java
  • src/test/java/manytools/RequestHeadersForm.java

Comment thread src/test/java/manytools/ManyToolsForm.java
Comment thread src/test/java/manytools/RequestHeadersForm.java
@mialeska
mialeska merged commit 10fc6d1 into master Jul 29, 2026
4 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in Aquality Selenium Jul 29, 2026
@mialeska
mialeska deleted the enhancement/update-to-selenium-4.46.0 branch July 29, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request feature java

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant