Closed selenium-ci closed 1 week ago
**Action:** Ruby / Remote Tests (edge, windows) / Remote Tests (edge, windows) |
**Failed stage:** [Run Bazel](https://github.com/SeleniumHQ/selenium/actions/runs/9603188050/job/26486031568) [โ] |
**Failed test name:** Selenium::WebDriver::Driver one element raises if invalid locator |
**Failure summary:**
The action failed because the test Selenium::WebDriver::Driver one element raises if invalid locator failed. The test failed due to the following reasons: InvalidSelectorError to be raised when an invalid XPath expression '*?//-' was used. JavascriptError was raised with the message indicating that the string '*?//-' is not a valid XPath expression. |
Relevant error logs:```yaml 1: ##[group]Operating System 2: Microsoft Windows Server 2022 ... 728: [32m[2,961 / 3,105][0m Running bundle install (@bundle//:bundle); 57s local, disk-cache ... (4 actions, 3 running) 729: [32m[2,967 / 3,105][0m Running bundle install (@bundle//:bundle); 58s local, disk-cache ... (3 actions running) 730: [32m[2,973 / 3,105][0m Running bundle install (@bundle//:bundle); 59s local, disk-cache ... (2 actions, 1 running) 731: [32m[2,974 / 3,105][0m Running bundle install (@bundle//:bundle); 61s local, disk-cache ... (2 actions, 1 running) 732: [32m[2,974 / 3,105][0m Running bundle install (@bundle//:bundle); 62s local, disk-cache ... (2 actions running) 733: [32m[2,975 / 3,105][0m Running bundle install (@bundle//:bundle); 64s local, disk-cache ... (2 actions, 1 running) 734: [32m[2,980 / 3,105][0m Running bundle install (@bundle//:bundle); 65s local, disk-cache ... (4 actions, 3 running) 735: [32mINFO: [0mFrom Building java/src/org/openqa/selenium/remote/libapi-class.jar (66 source files): 736: java\src\org\openqa\selenium\remote\ErrorHandler.java:46: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 737: private final ErrorCodes errorCodes; 738: ^ 739: java\src\org\openqa\selenium\remote\ErrorHandler.java:60: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 740: this.errorCodes = new ErrorCodes(); 741: ^ 742: java\src\org\openqa\selenium\remote\ErrorHandler.java:68: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 743: public ErrorHandler(ErrorCodes codes, boolean includeServerErrors) { 744: ^ 745: java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 746: ErrorCodes errorCodes = new ErrorCodes(); 747: ^ 748: java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 749: ErrorCodes errorCodes = new ErrorCodes(); 750: ^ 751: java\src\org\openqa\selenium\remote\ProtocolHandshake.java:181: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 752: response.setStatus(ErrorCodes.SUCCESS); 753: ^ 754: java\src\org\openqa\selenium\remote\ProtocolHandshake.java:182: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 755: response.setState(ErrorCodes.SUCCESS_STRING); 756: ^ 757: java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:53: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 758: new ErrorCodes().toStatus((String) rawError, Optional.of(tuple.getStatusCode()))); 759: ^ 760: java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:56: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 761: new ErrorCodes().getExceptionType((String) rawError); 762: ^ 763: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:44: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 764: private final ErrorCodes errorCodes = new ErrorCodes(); 765: ^ 766: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:44: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 767: private final ErrorCodes errorCodes = new ErrorCodes(); 768: ^ 769: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:55: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 770: int status = response.getStatus() == ErrorCodes.SUCCESS ? HTTP_OK : HTTP_INTERNAL_ERROR; 771: ^ 772: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:101: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 773: response.setStatus(ErrorCodes.UNKNOWN_COMMAND); 774: ^ 775: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:103: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 776: response.setStatus(ErrorCodes.UNHANDLED_ERROR); 777: ^ 778: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:124: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 779: response.setStatus(ErrorCodes.SUCCESS); 780: ^ 781: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:125: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 782: response.setState(errorCodes.toState(ErrorCodes.SUCCESS)); 783: ^ 784: java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:131: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 785: response.setState(errorCodes.toState(ErrorCodes.SUCCESS)); 786: ^ 787: java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:70: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 788: private final ErrorCodes errorCodes = new ErrorCodes(); 789: ^ 790: java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:70: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 791: private final ErrorCodes errorCodes = new ErrorCodes(); 792: ^ 793: java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:93: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 794: response.setStatus(ErrorCodes.UNKNOWN_COMMAND); 795: ^ 796: java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:98: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 797: response.setStatus(ErrorCodes.UNHANDLED_ERROR); 798: ^ 799: java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:145: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 800: response.setStatus(ErrorCodes.SUCCESS); ... 979: [32m[3,112 / 3,128][0m 7 / 28 tests;[0m Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 202s local, disk-cache ... (4 actions, 2 running) 980: [32m[3,113 / 3,128][0m 8 / 28 tests;[0m Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 203s local, disk-cache ... (4 actions, 1 running) 981: [32m[3,113 / 3,128][0m 8 / 28 tests;[0m Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 213s local, disk-cache ... (4 actions, 1 running) 982: [32m[3,113 / 3,128][0m 8 / 28 tests;[0m Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 215s local, disk-cache ... (4 actions, 1 running) 983: [32m[3,113 / 3,128][0m 8 / 28 tests;[0m Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 236s local, disk-cache ... (4 actions, 2 running) 984: [31m[1mFAIL: [0m//rb/spec/integration/selenium/webdriver:driver-edge-remote (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/driver-edge-remote/test.log) 985: ==================== Test output for //rb/spec/integration/selenium/webdriver:driver-edge-remote: 986: 2024-06-20 19:45:32 INFO Selenium Server Location: D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/bin/rb/spec/integration/selenium/webdriver/driver-edge-remote.cmd.runfiles/_main/java/src/org/openqa/selenium/grid/selenium_server_deploy.jar 987: [31m[1mFAILED: [0m//rb/spec/integration/selenium/webdriver:driver-edge-remote (Summary) ... 1013: finds by xpath 1014: finds by css selector 1015: finds by tag name 1016: finds above another 1017: finds child element 1018: finds child element by tag name 1019: finds elements with the shortcut syntax 1020: raises if element not found 1021: raises if invalid locator (FAILED - 1) ... 1051: is able to pass element arguments 1052: is able to pass in multiple arguments 1053: execute async script 1054: is able to return arrays of primitives from async scripts 1055: is able to pass multiple arguments to async scripts 1056: times out if the callback is not invoked 1057: Failures: 1058: 1) Selenium::WebDriver::Driver one element raises if invalid locator 1059: Failure/Error: 1060: expect { 1061: driver.find_element(xpath: '*?//-') 1062: }.to raise_error(Error::InvalidSelectorError, /errors#invalid-selector-exception/) 1063: expected Selenium::WebDriver::Error::InvalidSelectorError with message matching /errors#invalid-selector-exception/, got # |
โฑ๏ธ Estimated effort to review [1-5] | 4 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: The PR introduces a large number of changes across multiple files and languages. It is crucial to ensure that all updates, especially those related to version updates and dependencies, are compatible and do not introduce any breaking changes. |
Performance Concerns: The updates to libraries such as Netty, OpenTelemetry, and others could potentially affect performance. It is important to verify that these updates improve or at least do not degrade performance. | |
Dependency Management: The PR updates several dependencies. It is essential to ensure that these updates do not introduce conflicts with other parts of the system. |
Category | Suggestion | Score |
Possible issue |
Add a null check for the constructor parameter to prevent potential
___
**Add a null check for the | 8 |
Add null checks for constructor parameters to prevent potential
___
**Consider adding null checks for the | 7 | |
Best practice |
Initialize
___
**Consider initializing the | 7 |
Verify the compatibility and testing of the newly added version in
___
**Ensure that the new version "v126" added to | 5 | |
Maintainability |
Use a constant for the version number to avoid hardcoding it in multiple places___ **Consider using a constant for the version number to avoid hardcoding it in multipleplaces, which can help prevent inconsistencies during updates.** [py/selenium/webdriver/__init__.py [47]](https://github.com/SeleniumHQ/selenium/pull/14163/files#diff-732bc7e9407665904a87e936982e0941f13539f354f03b205efcd65ed803d28dR47-R47) ```diff -__version__ = "4.22.0" +from ..version import VERSION +__version__ = VERSION ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 7Why: Using a constant for version numbers is a good practice to avoid inconsistencies, especially given multiple occurrences across files. | 7 |
Read the version number from a single source of truth to avoid discrepancies___ **Consider reading the version number from a single source of truth, such as a version file,to avoid discrepancies and make version management easier.** [py/setup.py [30]](https://github.com/SeleniumHQ/selenium/pull/14163/files#diff-722aeeec2821793eb6adf0c529cc7439c4b27ce78937cbb8840e94d4fc1c4017R30-R30) ```diff -'version': "4.22.0", +'version': open(join(abspath(dirname(__file__)), "VERSION")).read().strip(), ``` - [ ] **Apply this suggestion** Suggestion importance[1-10]: 7Why: Centralizing the version number in a single file is a good practice for maintainability and consistency, aligning with the changes in multiple files. | 7 | |
Add comments explaining the purpose of the
___
**Consider adding a comment explaining the purpose of the | 6 | |
Group related commands together for better readability and maintainability___ **To improve readability and maintainability, consider grouping related commands together,such as placing all breakpoint related commands in a contiguous block.**
[common/devtools/chromium/v126/js_protocol.pdl [306-332]](https://github.com/SeleniumHQ/selenium/pull/14163/files#diff-0cdbe01ee99071ca3fd7a8a61cfd18d05aeb7fd5266285b1a60e54a96ae42001R306-R332)
```diff
command removeBreakpoint
parameters
BreakpointId breakpointId
+
+command setBreakpoint
+ parameters
+ Location location
+ optional string condition
+ returns
+ BreakpointId breakpointId
+ Location actualLocation
+
+command setBreakpointByUrl
+ parameters
+ integer lineNumber
+ optional string url
+ optional string urlRegex
+ optional string scriptHash
+ optional integer columnNumber
+ optional string condition
+ returns
+ BreakpointId breakpointId
+ array of Location locations
command restartFrame
parameters
CallFrameId callFrameId
experimental optional enum mode
StepInto
```
- [ ] **Apply this suggestion**
Suggestion importance[1-10]: 5Why: Grouping related commands can indeed improve readability and maintainability. However, the suggestion does not reflect a critical change and the existing structure might already have a logical grouping that is not evident without full context. | 5 | |
Validation |
Add validation to ensure
___
**Consider adding a validation step to ensure that the | 7 |
Add validation to ensure
___
**Ensure that the | 7 | |
Enhancement |
Use static imports to reduce verbosity in the
___
**Consider using a static import for | 6 |
Documentation |
Add a description for the
___
**Add a brief description for the | 6 |
User description
Warning: Manually update the changelogs before merging
This PR:
PR Type
Enhancement, Dependencies
Description
Changes walkthrough ๐
23 files
v126Target.java
Update DevTools Target implementation to v126
java/src/org/openqa/selenium/devtools/v126/v126Target.java
v126Network.java
Update DevTools Network implementation to v126
java/src/org/openqa/selenium/devtools/v126/v126Network.java
v126Events.java
Update DevTools Events implementation to v126
java/src/org/openqa/selenium/devtools/v126/v126Events.java
v126Domains.java
Update DevTools Domains implementation to v126
java/src/org/openqa/selenium/devtools/v126/v126Domains.java
v126Javascript.java
Update DevTools Javascript implementation to v126
java/src/org/openqa/selenium/devtools/v126/v126Javascript.java
v126Log.java
Update DevTools Log implementation to v126
java/src/org/openqa/selenium/devtools/v126/v126Log.java
v126CdpInfo.java
Update DevTools CDP Info to v126
java/src/org/openqa/selenium/devtools/v126/v126CdpInfo.java
V126Domains.cs
Update .NET DevTools Domains to v126
dotnet/src/webdriver/DevTools/v126/V126Domains.cs
V126Network.cs
Update .NET DevTools Network to v126
dotnet/src/webdriver/DevTools/v126/V126Network.cs
V126JavaScript.cs
Update .NET DevTools JavaScript to v126
dotnet/src/webdriver/DevTools/v126/V126JavaScript.cs
V126Target.cs
Update .NET DevTools Target to v126
dotnet/src/webdriver/DevTools/v126/V126Target.cs
V126Log.cs
Update .NET DevTools Log to v126
dotnet/src/webdriver/DevTools/v126/V126Log.cs
DevToolsDomains.cs
Add support for DevTools v126 in .NET
dotnet/src/webdriver/DevTools/DevToolsDomains.cs - Updated supported DevTools versions to include v126.
StableChannelChromeDriver.cs
Update default ChromeDriver version to 126
dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs - Updated default browser version to 126.
version.rb
Update Ruby DevTools version to 0.126.0
rb/lib/selenium/devtools/version.rb - Updated DevTools version to 0.126.0.
version.rb
Update Ruby WebDriver version to 4.22.0
rb/lib/selenium/webdriver/version.rb - Updated WebDriver version to 4.22.0.
selenium-dotnet-version.bzl
Update .NET Selenium version and DevTools support
dotnet/selenium-dotnet-version.bzl
__init__.py
Update Python WebDriver version to 4.22.0
py/selenium/webdriver/__init__.py - Updated WebDriver version to 4.22.0.
setup.py
Update Python package version to 4.22.0
py/setup.py - Updated package version to 4.22.0.
versions.bzl
Add support for CDP v126 in Java
java/src/org/openqa/selenium/devtools/versions.bzl - Updated supported CDP versions to include v126.
__init__.py
Update Python Selenium version to 4.22.0
py/selenium/__init__.py - Updated version to 4.22.0.
version.bzl
Update Java Selenium version to 4.22.0
java/version.bzl - Updated Selenium version to 4.22.0.
js_protocol.pdl
Add new protocol definition for v126
common/devtools/chromium/v126/js_protocol.pdl - Added new protocol definition for v126.
8 files
DevToolsTargetTest.cs
Update DevTools Target Test to v126
dotnet/test/common/DevTools/DevToolsTargetTest.cs - Updated CurrentCdpVersion to V126. - Updated test ID to 126.
DevToolsConsoleTest.cs
Update DevTools Console Test to v126
dotnet/test/common/DevTools/DevToolsConsoleTest.cs - Updated CurrentCdpVersion to V126.
DevToolsNetworkTest.cs
Update DevTools Network Test to v126
dotnet/test/common/DevTools/DevToolsNetworkTest.cs - Updated CurrentCdpVersion to V126.
DevToolsPerformanceTest.cs
Update DevTools Performance Test to v126
dotnet/test/common/DevTools/DevToolsPerformanceTest.cs - Updated CurrentCdpVersion to V126.
DevToolsProfilerTest.cs
Update DevTools Profiler Test to v126
dotnet/test/common/DevTools/DevToolsProfilerTest.cs - Updated CurrentCdpVersion to V126.
DevToolsSecurityTest.cs
Update DevTools Security Test to v126
dotnet/test/common/DevTools/DevToolsSecurityTest.cs - Updated CurrentCdpVersion to V126.
DevToolsTabsTest.cs
Update DevTools Tabs Test to v126
dotnet/test/common/DevTools/DevToolsTabsTest.cs - Updated CurrentCdpVersion to V126.
DevToolsLogTest.cs
Update DevTools Log Test to v126
dotnet/test/common/DevTools/DevToolsLogTest.cs - Updated CurrentCdpVersion to V126.
5 files
repositories.bzl
Update pinned Firefox versions and URLs
common/repositories.bzl - Updated Firefox versions and URLs for Linux and Mac.
selenium_manager.bzl
Update Selenium Manager versions and URLs
common/selenium_manager.bzl
Windows.
MODULE.bazel
Update Maven dependencies
MODULE.bazel - Updated Maven dependencies to newer versions.
package-lock.json
Update package-lock.json for 4.22.0
package-lock.json - Updated version to 4.22.0.
package.json
Update package.json for 4.22.0
javascript/node/selenium-webdriver/package.json - Updated version to 4.22.0.
7 files
conf.py
Update Python documentation version to 4.22.0
py/docs/source/conf.py - Updated release version to 4.22.0.
AUTHORS
Add new authors to AUTHORS file
AUTHORS - Added new authors to the AUTHORS file.
CHANGELOG
Update Java changelog for 4.22.0
java/CHANGELOG - Added changelog entries for version 4.22.0.
CHANGES
Update Ruby changelog for 4.22.0
rb/CHANGES - Added changelog entries for version 4.22.0.
CHANGES
Update Python changelog for 4.22.0
py/CHANGES - Added changelog entries for version 4.22.0.
CHANGES.md
Update JavaScript changelog for 4.22.0
javascript/node/selenium-webdriver/CHANGES.md - Added changelog entries for version 4.22.0.
CHANGELOG
Update .NET changelog for 4.22.0
dotnet/CHANGELOG - Added changelog entries for version 4.22.0.
7 files
BUILD.bazel
Add build rules for v126 protocol files
common/devtools/chromium/v126/BUILD.bazel - Added build rules for v126 protocol files.
WebDriver.csproj
Update .NET build command for v126 CDP
dotnet/src/webdriver/WebDriver.csproj - Updated build command to generate v126 CDP.
Rakefile
Update Rakefile for Java release targets
Rakefile - Updated Java release targets to include v126.
BUILD.bazel
Update JavaScript build configuration for 4.22.0
javascript/node/selenium-webdriver/BUILD.bazel
BUILD.bazel
Update Python build configuration for 4.22.0
py/BUILD.bazel
BUILD.bazel
Update build configuration for v126
java/src/org/openqa/selenium/devtools/v126/BUILD.bazel - Updated CDP version to v126.
BUILD.bazel
Update Ruby build configuration for v126
rb/lib/selenium/devtools/BUILD.bazel - Updated CDP version to v126.