Skip to content

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Oct 10, 2024

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Fixes #14576
Grid supports Setting custom capabilities for matching specific Nodes.
However, recently, this feat hasn't worked anymore. It could be due to a few capabilities (e.g: networkname:applicationName, nodename:applicationName) getting filtered (not meeting standards or something else) before coming to DefaultSlotMatcher.
Via a fix recently #14323. All caps that start with the prefix se: are retained in the session response.
Cap name contains se: is generic for many purposes, and those are also excluded in slot matcher decision as current implementation.
So, to make the feat custom caps for matching specific Nodes works, we will dedicate a prefix se:slotMatcher, for any cap name starts with this prefix will be used in DefaultSlotMatcher decision.
Also, it could be similar to #14323, adding an end-to-end test for this is tricky.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Change
The new extensionCapabilitiesMatch method with additional parameters might affect existing behavior. Ensure all use cases are covered.

Configuration Change
The default VNC environment variable has been changed from SE_START_XVFB to SE_START_VNC. This might affect existing setups.

@VietND96 VietND96 changed the title [grid]: Capabilities prefix starts with se:slotMatcher for DefaultSlo… [grid]: Capabilities prefix starts with se:slotMatcher for DefaultSlotMatcher decision Oct 10, 2024
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Performance
Use a Set instead of a List for constant collections to potentially improve lookup performance

Consider using Set instead of List for EXTENSION_CAPABILITIES_PREFIXES to
potentially improve lookup performance, especially if the list grows larger in the
future.

java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java [51-52]

-private static final List<String> EXTENSION_CAPABILITIES_PREFIXES =
-    Arrays.asList("goog:", "moz:", "ms:", "se:");
+private static final Set<String> EXTENSION_CAPABILITIES_PREFIXES =
+    Set.of("goog:", "moz:", "ms:", "se:");
  • Apply this suggestion
Suggestion importance[1-10]: 7

Why: Changing from a List to a Set for EXTENSION_CAPABILITIES_PREFIXES can improve lookup performance, especially if the collection grows. This is a reasonable suggestion for optimizing performance.

7
Maintainability
Extract complex stream operations into separate methods to improve code readability and maintainability

Consider extracting the complex stream operation in the extensionCapabilitiesMatch
method into a separate, well-named method to improve readability and
maintainability.

java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java [166-176]

-return stereotype.getCapabilityNames().stream()
-    .filter(name -> name.contains(nameContains))
-    .filter(name -> capabilities.asMap().containsKey(name))
-    .filter(
-        name ->
-            !excludeExtensionPrefixes
-                || EXTENSION_CAPABILITIES_PREFIXES.stream().noneMatch(name::contains))
-    .map(
-        name -> {
-          if (capabilities.getCapability(name) instanceof String) {
+private Stream<String> filterCapabilityNames(Capabilities stereotype, Capabilities capabilities,
+    String nameContains, boolean excludeExtensionPrefixes) {
+    return stereotype.getCapabilityNames().stream()
+        .filter(name -> name.contains(nameContains))
+        .filter(name -> capabilities.asMap().containsKey(name))
+        .filter(name -> !excludeExtensionPrefixes
+            || EXTENSION_CAPABILITIES_PREFIXES.stream().noneMatch(name::contains));
+}
+
+// In the extensionCapabilitiesMatch method:
+return filterCapabilityNames(stereotype, capabilities, nameContains, excludeExtensionPrefixes)
+    .map(name -> {
+        if (capabilities.getCapability(name) instanceof String) {
             return stereotype
  • Apply this suggestion
Suggestion importance[1-10]: 6

Why: Extracting the complex stream operation into a separate method can enhance readability and maintainability by providing a clear, descriptive method name. This is a good practice, though the immediate impact is moderate.

6
Best practice
Use a constant for string literals to improve code maintainability

Consider using a constant for the ":" string literal in the
extensionCapabilitiesMatch method call. This improves maintainability and reduces
the risk of typos.

java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java [158]

-return extensionCapabilitiesMatch(stereotype, capabilities, ":", true);
+private static final String COLON = ":";
+// ...
+return extensionCapabilitiesMatch(stereotype, capabilities, COLON, true);
Suggestion importance[1-10]: 5

Why: Using a constant for the ":" string literal can improve maintainability by reducing the risk of typos and making the code easier to update if the literal changes. However, the impact is relatively minor as it only affects a single line.

5

💡 Need additional feedback ? start a PR chat

Copy link
Contributor

qodo-merge-pro bot commented Oct 10, 2024

CI Failure Feedback 🧐

(Checks updated until commit 0973487)

Action: Ruby / Remote Tests (edge, windows) / Remote Tests (edge, windows)

Failed stage: Run Bazel [❌]

Failed test name: Selenium::WebDriver::Remote::Driver errors when not set

Failure summary:

The action failed because the test Selenium::WebDriver::Remote::Driver errors when not set did not
pass. The test expected a Selenium::WebDriver::Error::WebDriverError to be raised with the message
"You must enable downloads in order to work with downloadable files." However, it received a
Selenium::WebDriver::Error::UnknownError indicating that the downloads file system could not be
found for the session id.

Relevant error logs:
1:  ##[group]Operating System
2:  Microsoft Windows Server 2022
...

626:  �[32mINFO: �[0mFrom Building external/protobuf~/java/core/liblite_runtime_only.jar (91 source files) [for tool]:
627:  external\protobuf~\java\core\src\main\java\com\google\protobuf\UnsafeUtil.java:293: warning: [removal] AccessController in java.security has been deprecated and marked for removal
628:  AccessController.doPrivileged(
629:  ^
630:  �[32m[1,933 / 3,163]�[0m Stamping the manifest of @@rules_jvm_external~~maven~maven//:org_jspecify_jspecify; 0s disk-cache ... (4 actions, 0 running)
631:  �[32m[2,112 / 3,163]�[0m [Prepa] Installing external/rules_ruby~~ruby~bundle/rb/vendor/cache/bundler-2.5.14.gem (@bundle//:bundler-2.5.14) ... (4 actions, 0 running)
632:  �[32m[2,255 / 3,163]�[0m Installing external/rules_ruby~~ruby~bundle/rb/vendor/cache/bundler-2.5.14.gem (@bundle//:bundler-2.5.14); 0s local, disk-cache ... (4 actions, 1 running)
633:  �[32mINFO: �[0mFrom Building java/src/org/openqa/selenium/remote/libapi-class.jar (71 source files):
634:  java\src\org\openqa\selenium\remote\ErrorHandler.java:46: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
635:  private final ErrorCodes errorCodes;
636:  ^
637:  java\src\org\openqa\selenium\remote\ErrorHandler.java:60: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
638:  this.errorCodes = new ErrorCodes();
639:  ^
640:  java\src\org\openqa\selenium\remote\ErrorHandler.java:68: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
641:  public ErrorHandler(ErrorCodes codes, boolean includeServerErrors) {
642:  ^
643:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
644:  ErrorCodes errorCodes = new ErrorCodes();
645:  ^
646:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
647:  ErrorCodes errorCodes = new ErrorCodes();
648:  ^
649:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:181: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
650:  response.setStatus(ErrorCodes.SUCCESS);
651:  ^
652:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:182: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
653:  response.setState(ErrorCodes.SUCCESS_STRING);
654:  ^
655:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:53: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
656:  new ErrorCodes().toStatus((String) rawError, Optional.of(tuple.getStatusCode())));
657:  ^
658:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:56: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
659:  new ErrorCodes().getExceptionType((String) rawError);
660:  ^
661:  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
662:  private final ErrorCodes errorCodes = new ErrorCodes();
663:  ^
664:  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
665:  private final ErrorCodes errorCodes = new ErrorCodes();
666:  ^
667:  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
668:  int status = response.getStatus() == ErrorCodes.SUCCESS ? HTTP_OK : HTTP_INTERNAL_ERROR;
669:  ^
670:  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
671:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
672:  ^
673:  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
674:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
675:  ^
676:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:117: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
677:  response.setStatus(ErrorCodes.SUCCESS);
678:  ^
679:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:118: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
680:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
681:  ^
682:  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
683:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
684:  ^
685:  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
686:  private final ErrorCodes errorCodes = new ErrorCodes();
687:  ^
688:  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
689:  private final ErrorCodes errorCodes = new ErrorCodes();
690:  ^
691:  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
692:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
693:  ^
694:  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
695:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
696:  ^
697:  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
698:  response.setStatus(ErrorCodes.SUCCESS);
...

836:  �[32m[3,165 / 3,187]�[0m 2 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 24s ... (4 actions, 2 running)
837:  �[32m[3,166 / 3,187]�[0m 3 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 26s ... (4 actions, 1 running)
838:  �[32m[3,166 / 3,187]�[0m 3 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 36s ... (4 actions, 1 running)
839:  �[32m[3,166 / 3,187]�[0m 3 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 38s ... (4 actions, 1 running)
840:  �[32m[3,166 / 3,187]�[0m 3 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:listener-edge-remote; 20s ... (4 actions, 2 running)
841:  �[32m[3,167 / 3,187]�[0m 4 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:listener-edge-remote; 21s ... (4 actions, 1 running)
842:  �[32m[3,167 / 3,187]�[0m 4 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:listener-edge-remote; 31s ... (4 actions, 1 running)
843:  �[32m[3,167 / 3,187]�[0m 4 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:listener-edge-remote; 35s ... (4 actions, 1 running)
844:  �[32m[3,167 / 3,187]�[0m 4 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:error-edge-remote; 32s ... (4 actions, 2 running)
845:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_1.log)
846:  �[32m[3,167 / 3,187]�[0m 4 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:error-edge-remote; 33s ... (4 actions, 2 running)
847:  �[32m[3,167 / 3,187]�[0m 4 / 29 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:error-edge-remote; 44s ... (4 actions, 2 running)
...

871:  �[32m[3,172 / 3,187]�[0m 9 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 193s local, disk-cache ... (4 actions, 2 running)
872:  �[32m[3,172 / 3,187]�[0m 9 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 203s local, disk-cache ... (4 actions, 2 running)
873:  �[32m[3,173 / 3,187]�[0m 10 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 204s local, disk-cache ... (4 actions, 1 running)
874:  �[32m[3,173 / 3,187]�[0m 10 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 205s local, disk-cache ... (4 actions, 1 running)
875:  �[32m[3,173 / 3,187]�[0m 10 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 215s local, disk-cache ... (4 actions, 1 running)
876:  �[32m[3,173 / 3,187]�[0m 10 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 219s local, disk-cache ... (4 actions, 1 running)
877:  �[32m[3,173 / 3,187]�[0m 10 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 230s local, disk-cache ... (4 actions, 2 running)
878:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test.log)
879:  �[31m�[1mFAILED: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (Summary)
...

894:  Selenium::WebDriver::Remote::Driver
895:  exposes session_id
896:  exposes remote status
897:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
898:  uses a default file detector
899:  lists downloads
900:  downloads a file
901:  deletes downloadable files
902:  errors when not set (FAILED - 1)
903:  Failures:
904:  1) Selenium::WebDriver::Remote::Driver errors when not set
905:  Failure/Error:
906:  expect {
907:  driver.downloadable_files
908:  }.to raise_exception(Error::WebDriverError,
909:  'You must enable downloads in order to work with downloadable files.')
910:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 54f7639... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
911:  Driver info: driver.version: unknown> with backtrace:
912:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
913:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
...

919:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
920:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
921:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
922:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
923:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
924:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
925:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
926:  Finished in 22.15 seconds (files took 0.80802 seconds to load)
927:  7 examples, 1 failure
928:  Failed examples:
929:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
...

941:  Selenium::WebDriver::Remote::Driver
942:  exposes session_id
943:  exposes remote status
944:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
945:  uses a default file detector
946:  lists downloads
947:  downloads a file
948:  deletes downloadable files
949:  errors when not set (FAILED - 1)
950:  Failures:
951:  1) Selenium::WebDriver::Remote::Driver errors when not set
952:  Failure/Error:
953:  expect {
954:  driver.downloadable_files
955:  }.to raise_exception(Error::WebDriverError,
956:  'You must enable downloads in order to work with downloadable files.')
957:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: a1fa324... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
958:  Driver info: driver.version: unknown> with backtrace:
959:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
960:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
...

966:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
967:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
968:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
969:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
970:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
971:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
972:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
973:  Finished in 21.04 seconds (files took 0.76516 seconds to load)
974:  7 examples, 1 failure
975:  Failed examples:
976:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
...

988:  Selenium::WebDriver::Remote::Driver
989:  exposes session_id
990:  exposes remote status
991:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
992:  uses a default file detector
993:  lists downloads
994:  downloads a file
995:  deletes downloadable files
996:  errors when not set (FAILED - 1)
997:  Failures:
998:  1) Selenium::WebDriver::Remote::Driver errors when not set
999:  Failure/Error:
1000:  expect {
1001:  driver.downloadable_files
1002:  }.to raise_exception(Error::WebDriverError,
1003:  'You must enable downloads in order to work with downloadable files.')
1004:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 2aaba2b... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
1005:  Driver info: driver.version: unknown> with backtrace:
1006:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
1007:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
...

1013:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
1014:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
1015:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
1016:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
1017:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
1018:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
1019:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
1020:  Finished in 20.05 seconds (files took 0.79768 seconds to load)
1021:  7 examples, 1 failure
1022:  Failed examples:
1023:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
1024:  ================================================================================
1025:  �[32m[3,174 / 3,187]�[0m 11 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 38s ... (4 actions, 1 running)
1026:  �[32m[3,174 / 3,187]�[0m 11 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 48s ... (4 actions, 1 running)
1027:  �[32m[3,174 / 3,187]�[0m 11 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:element-edge-remote; 50s ... (4 actions, 1 running)
1028:  �[32m[3,174 / 3,187]�[0m 11 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 27s ... (4 actions, 2 running)
1029:  �[32m[3,175 / 3,187]�[0m 12 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 29s ... (4 actions, 1 running)
1030:  �[32m[3,175 / 3,187]�[0m 12 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 39s ... (4 actions, 1 running)
1031:  �[32m[3,175 / 3,187]�[0m 12 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:driver-edge-remote; 42s ... (4 actions, 1 running)
1032:  �[32m[3,175 / 3,187]�[0m 12 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-edge-remote; 31s ... (4 actions, 2 running)
1033:  �[32m[3,176 / 3,187]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-edge-remote; 32s ... (4 actions, 1 running)
1034:  �[32m[3,176 / 3,187]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-edge-remote; 43s ... (4 actions, 1 running)
1035:  �[32m[3,176 / 3,187]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-edge-remote; 46s ... (4 actions, 1 running)
1036:  �[32m[3,176 / 3,187]�[0m 13 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:guard-edge-remote; 48s ... (4 actions, 2 running)
1037:  �[32m[3,177 / 3,187]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:guard-edge-remote; 49s ... (4 actions, 1 running)
1038:  �[32m[3,177 / 3,187]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:guard-edge-remote; 59s ... (4 actions, 1 running)
1039:  �[32m[3,177 / 3,187]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:guard-edge-remote; 62s ... (4 actions, 1 running)
1040:  �[32m[3,177 / 3,187]�[0m 14 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:target_locator-edge-remote; 35s ... (4 actions, 2 running)
1041:  �[32m[3,178 / 3,187]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:target_locator-edge-remote; 36s ... (4 actions, 1 running)
1042:  �[32m[3,178 / 3,187]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:target_locator-edge-remote; 46s ... (4 actions, 1 running)
1043:  �[32m[3,178 / 3,187]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:target_locator-edge-remote; 48s ... (4 actions, 1 running)
1044:  �[32m[3,178 / 3,187]�[0m 15 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:storage-edge-remote; 17s ... (4 actions, 2 running)
1045:  �[32m[3,179 / 3,187]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:storage-edge-remote; 19s ... (4 actions, 1 running)
1046:  �[32m[3,179 / 3,187]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:storage-edge-remote; 29s ... (4 actions, 1 running)
1047:  �[32m[3,179 / 3,187]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:storage-edge-remote; 33s ... (4 actions, 1 running)
1048:  �[32m[3,179 / 3,187]�[0m 16 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 28s ... (4 actions, 2 running)
1049:  �[32m[3,180 / 3,187]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 30s ... (4 actions, 1 running)
1050:  �[32m[3,180 / 3,187]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 40s ... (4 actions, 1 running)
1051:  �[32m[3,180 / 3,187]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-edge-remote; 43s ... (4 actions, 1 running)
1052:  �[32m[3,180 / 3,187]�[0m 17 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 29s ... (4 actions, 2 running)
1053:  �[32m[3,181 / 3,187]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 31s ... (4 actions, 1 running)
1054:  �[32m[3,181 / 3,187]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 41s ... (4 actions, 1 running)
1055:  �[32m[3,181 / 3,187]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote; 43s ... (4 actions, 1 running)
1056:  �[32m[3,181 / 3,187]�[0m 18 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:fedcm-edge-remote; 20s ... (4 actions, 2 running)
1057:  �[32m[3,182 / 3,187]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:fedcm-edge-remote; 21s ... (4 actions, 1 running)
1058:  �[32m[3,182 / 3,187]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:fedcm-edge-remote; 32s ... (4 actions, 1 running)
1059:  �[32m[3,182 / 3,187]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:fedcm-edge-remote; 34s ... (4 actions, 1 running)
1060:  �[32m[3,182 / 3,187]�[0m 19 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:select-edge-remote; 18s ... (4 actions, 2 running)
1061:  �[32m[3,183 / 3,187]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:select-edge-remote; 19s ... (4 actions, 1 running)
1062:  �[32m[3,183 / 3,187]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:select-edge-remote; 29s ... (4 actions, 1 running)
1063:  �[32m[3,183 / 3,187]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:select-edge-remote; 32s ... (4 actions, 1 running)
1064:  �[32m[3,183 / 3,187]�[0m 20 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 19s ... (4 actions, 2 running)
1065:  �[32m[3,184 / 3,187]�[0m 21 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 21s ... (3 actions, 1 running)
1066:  �[32m[3,184 / 3,187]�[0m 21 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 31s ... (3 actions, 1 running)
1067:  �[32m[3,184 / 3,187]�[0m 21 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 28s ... (3 actions, 2 running)
1068:  �[32m[3,185 / 3,187]�[0m 22 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 30s ... (2 actions, 1 running)
1069:  �[32m[3,185 / 3,187]�[0m 22 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 40s ... (2 actions, 1 running)
1070:  �[32m[3,185 / 3,187]�[0m 22 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/edge:options-edge-remote; 20s local, disk-cache ... (2 actions running)
1071:  �[32m[3,186 / 3,187]�[0m 23 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 1s local, disk-cache
1072:  �[32m[3,186 / 3,187]�[0m 23 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 12s local, disk-cache
1073:  �[32m[3,186 / 3,187]�[0m 23 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-edge-remote; 14s local, disk-cache
1074:  �[32m[3,187 / 3,188]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 0s disk-cache
1075:  �[32m[3,187 / 3,188]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote
1076:  �[32m[3,187 / 3,188]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 1s local, disk-cache
1077:  �[32m[3,187 / 3,188]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 14s local, disk-cache
1078:  �[32m[3,188 / 3,189]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 0s disk-cache
1079:  �[32m[3,188 / 3,189]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote
1080:  �[32m[3,188 / 3,189]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 1s local, disk-cache
1081:  �[32m[3,188 / 3,189]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 85s local, disk-cache
1082:  �[32m[3,189 / 3,190]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 1s disk-cache
1083:  �[32m[3,189 / 3,190]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote
1084:  �[32m[3,189 / 3,190]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 1s local, disk-cache
1085:  �[32m[3,189 / 3,190]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 14s local, disk-cache
1086:  �[32m[3,190 / 3,191]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 0s disk-cache
1087:  �[32m[3,190 / 3,191]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote
1088:  �[32m[3,190 / 3,191]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 1s local, disk-cache
1089:  �[32m[3,190 / 3,191]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 14s local, disk-cache
1090:  �[32m[3,191 / 3,192]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 0s disk-cache
1091:  �[32m[3,191 / 3,192]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote
1092:  �[32m[3,191 / 3,192]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 1s local, disk-cache
1093:  �[32m[3,191 / 3,192]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 14s local, disk-cache
1094:  �[32mINFO: �[0mFound 29 test targets...
1095:  �[32mINFO: �[0mElapsed time: 1466.655s, Critical Path: 766.39s
1096:  �[32mINFO: �[0m2899 processes: 1621 disk cache hit, 1187 internal, 90 local, 1 worker.
1097:  �[32mINFO: �[0mBuild completed, 1 test FAILED, 2899 total actions
1098:  //rb/spec/integration/selenium/webdriver:action_builder-edge-remote      �[0m�[32mPASSED�[0m in 28.0s
1099:  //rb/spec/integration/selenium/webdriver:bidi-edge-remote                �[0m�[32mPASSED�[0m in 14.5s
1100:  //rb/spec/integration/selenium/webdriver:devtools-edge-remote            �[0m�[32mPASSED�[0m in 85.1s
1101:  //rb/spec/integration/selenium/webdriver:driver-edge-remote              �[0m�[32mPASSED�[0m in 33.3s
1102:  //rb/spec/integration/selenium/webdriver:element-edge-remote             �[0m�[32mPASSED�[0m in 29.2s
1103:  //rb/spec/integration/selenium/webdriver:error-edge-remote               �[0m�[32mPASSED�[0m in 14.6s
...

1118:  //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote �[0m�[32mPASSED�[0m in 14.4s
1119:  //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote  �[0m�[32mPASSED�[0m in 14.4s
1120:  //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote         �[0m�[32mPASSED�[0m in 14.5s
1121:  //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote         �[0m�[32mPASSED�[0m in 33.3s
1122:  //rb/spec/integration/selenium/webdriver/edge:options-edge-remote        �[0m�[32mPASSED�[0m in 20.9s
1123:  //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote        �[0m�[32mPASSED�[0m in 15.1s
1124:  //rb/spec/integration/selenium/webdriver/edge:service-edge-remote        �[0m�[32mPASSED�[0m in 21.5s
1125:  //rb/spec/integration/selenium/webdriver/remote:element-edge-remote      �[0m�[32mPASSED�[0m in 16.4s
1126:  //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote       �[0m�[31m�[1mFAILED�[0m in 3 out of 3 in 29.5s
1127:  Stats over 3 runs: max = 29.5s, min = 27.3s, avg = 28.4s, dev = 0.9s
1128:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test.log
1129:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_1.log
1130:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_2.log
1131:  Executed 29 out of 29 tests: 28 tests pass and �[0m�[31m�[1m1 fails locally�[0m.
1132:  There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
1133:  �[0m
1134:  ##[error]Process completed with exit code 1.

✨ CI feedback usage guide:

The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
The tool analyzes the failed checks and provides several feedbacks:

  • Failed stage
  • Failed test name
  • Failure summary
  • Relevant error logs

In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

/checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"

where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

Configuration options

  • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
  • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
  • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
  • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
  • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

See more information about the checks tool in the docs.

@VietND96 VietND96 force-pushed the custom-caps-for-slotMatcher branch from deb369a to 0973487 Compare October 10, 2024 06:03
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.78%. Comparing base (57f8398) to head (0973487).
Report is 804 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #14583      +/-   ##
==========================================
- Coverage   58.48%   57.78%   -0.70%     
==========================================
  Files          86       89       +3     
  Lines        5270     5609     +339     
  Branches      220      245      +25     
==========================================
+ Hits         3082     3241     +159     
- Misses       1968     2123     +155     
- Partials      220      245      +25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VietND96 VietND96 added the B-grid Everything grid and server related label Oct 10, 2024
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

I don't think this is needed. I checked the existing code in the DefaultSlotMatcher and it should be working. I will ask more question in the linked issue.

@VietND96
Copy link
Member Author

I am closing this PR, since this implementation is redundant.

@VietND96 VietND96 closed this Oct 10, 2024
@VietND96 VietND96 deleted the custom-caps-for-slotMatcher branch October 10, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-grid Everything grid and server related P-bug fix PR addresses a known issue Review effort [1-5]: 3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Unable to set the Custom Capabilities

2 participants