[build] Fix GeckoDriver rejecting system-access via capabilities - #17811
Conversation
PR Summary by QodoFix GeckoDriver system-access flag handling across bindings
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
This PR updates Firefox “system access” enablement to match GeckoDriver 0.37.1’s behavior change by moving the flag from Firefox capabilities/options to the GeckoDriver service layer across bindings, and adjusts/limits affected tests when running on Grid.
Changes:
- Ruby/Python/JS tests now request system access via the local GeckoDriver service (
--allow-system-access) and skip remote/Grid where this cannot be applied per-session. - Java adds
GeckoDriverService.Builder#withAllowSystemAccessand updates local context-switching coverage; remote-context cases are removed. - .NET adds
FirefoxDriverService.AllowSystemAccess, wires it into GeckoDriver args, and adds a regression test for command context switching.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb | Allows passing a driver service: into integration test driver creation. |
| rb/spec/integration/selenium/webdriver/firefox/driver_spec.rb | Switches context test to local GeckoDriver --allow-system-access and skips Grid. |
| py/test/selenium/webdriver/firefox/firefox_service_tests.py | Skips Firefox service tests on Grid where local service behavior isn’t exercised. |
| py/test/selenium/webdriver/firefox/firefox_context_tests.py | Uses local GeckoDriver service args for system access and skips Grid runs. |
| javascript/selenium-webdriver/test/firefox/contextSwitching_test.js | Uses a Firefox ServiceBuilder with --allow-system-access for context tests. |
| java/test/org/openqa/selenium/firefox/RemoteFirefoxDriverTest.java | Removes remote-context-switching coverage that can’t be supported per-session. |
| java/test/org/openqa/selenium/firefox/FirefoxDriverTest.java | Uses the new GeckoDriver service flag for local context switching test coverage. |
| java/src/org/openqa/selenium/firefox/GeckoDriverService.java | Adds withAllowSystemAccess and emits --allow-system-access when enabled. |
| dotnet/test/webdriver/Firefox/FirefoxCommandContextTests.cs | Adds coverage for get/set Firefox command context with system access enabled. |
| dotnet/src/webdriver/Firefox/FirefoxDriverService.cs | Adds AllowSystemAccess and appends --allow-system-access to GeckoDriver args. |
|
Code review by qodo was updated up to the latest commit 776477e |
|
Code review by qodo was updated up to the latest commit 66b47b2 |
🔗 Related Issues
Fixes test failures surfaced by #17804 (GeckoDriver 0.37.0 → 0.37.1 pin bump).
💥 What does this PR do?
GeckoDriver 0.37.1 dropped support for the
-remote-allow-system-accessFirefox argument viamoz:firefoxOptions; it must now be passed to GeckoDriver itself as--allow-system-access, which broke the chrome-context tests.GeckoDriverService.Builder#withAllowSystemAccess(Java) andFirefoxDriverService.AllowSystemAccess(.NET).🔧 Implementation Notes
System access can't be granted to a Grid session per-session, so context tests are now local-only:
--allow-system-accesson an explicit local service.--remote; Java drops theRemoteFirefoxDriverTestcontext cases (local coverage stays inFirefoxDriverTest); .NET uses a standalone local fixture.firefox_service_testsalso skip on--remote— local-only, no Grid flavor needed.🤖 AI assistance
💡 Additional Considerations
-remotetargets for local-only Firefox tests, and most .NETFirefoxDriverServiceargs are untested.🔄 Types of changes