Skip to content

Conversation

@titusfortner
Copy link
Member

@titusfortner titusfortner commented Oct 27, 2025

User description

I created a Struct subclass before that does not do what I thought it would do, so to start with, this is the fix for that.

The main idea is that instead of doing everything by Hash, we have 2 generic data structures, one for immutable objects (stuff that comes in as parameters from events), and one for mutable structures (stuff that gets edited). I think a lot of the things we're going to be working with in BiDi won't require much data processing of these types, but I figured it would be better to designate these than to just have everything as a Hash.

Ruby has a Data class for immutable arguments and a Struct class for mutable arguments.
Data.define and Struct.new take named parameters and create a subclass instance with those parameters as attr_reader or attr_accessor, with some other useful methods thrown in.

These classes have 2 parts: the definition and the construction. Struct used new for both which was confusing, so wehn adding Data, they decided to use define as it is more obvious what you are doing.
Baseline Ruby objects:

MyData = Data.define(:one, :two, :three)
my_data = MyData.new(1, 2, 3)

MyStruct = Struct.new(:one, :two, :three)
my_struct = MyStruct.new(one: 1, two: 2, three: 3)

This PR adjusts those defaults slightly to better represent our use cases:
Definition phase is the same, except aliased to allow Struct.define for consistency in our code
Construction phase:

  1. Ordered parameters are not allowed (for Data) only keyword arguments (like Struct) or Hashes
  2. Keys are converted from "camelStrings" to :snake_case
  3. Parameters are order agnostic
  4. Defaults values to nil instead of erroring to allow optional parameters

This is essentially the pattern I figured out when working with ClientConfig PR, just normalized into the class itself.

Since I created this pattern for a ClientConfig class, it seemed like it made sense to have it in Selenium::WebDriver::Types instead of somewhere in Selenium::WebDriver::BiDi.

BiDi has a lot of sub-members for things, and this will allow us to do things like:

Base = WebDriver::Types::Data.define(:one, :two, :three)
Sub  = WebDriver::Types::Data.define(*Base.members, :four, :five, :six)

you can also add functionality during definition like:

Something = WebDriver::Types::Data.define(:one, :two, :three) do
    def three?
        !!self.three
    end
end

I've marked these as @api private in case we want to do something different with them.

  • Do we need this? We can probably get away with Hashes for everything like we currently do, except BiDi exposes a lot more "Types" and I don't think most of these are going to involve anything we need to mutate or process in a special manner, and it would be nice to interact with them like a PORO instead of a Hash.

PR Type

Enhancement


Description

  • Introduce WebDriver::Types::Data and WebDriver::Types::Struct classes for managing serialization

  • Support camelCase to snake_case key conversion and optional keyword arguments

  • Replace BiDi::Struct with new centralized WebDriver::Types::Struct implementation

  • Refactor LogHandler to use shared base log entry members with new Struct class


Diagram Walkthrough

flowchart LR
  A["BiDi::Struct<br/>old implementation"] -->|"migrate to"| B["WebDriver::Types::Struct<br/>mutable records"]
  C["BiDi::Struct<br/>old implementation"] -->|"migrate to"| D["WebDriver::Types::Data<br/>immutable records"]
  B -->|"normalize args"| E["camelCase to snake_case<br/>conversion"]
  D -->|"normalize args"| E
  E -->|"support"| F["keyword arguments<br/>& hashes"]
Loading

File Walkthrough

Relevant files
Enhancement
5 files
types.rb
New Types module with normalization utilities                       
+44/-0   
data.rb
Immutable Data class for event parameters                               
+44/-0   
struct.rb
Refactored Struct class with camelCase support                     
+18/-12 
browser.rb
Update Window to use new Types::Struct                                     
+2/-1     
log_handler.rb
Refactor log entries with shared base members                       
+3/-2     
Cleanup
1 files
bidi.rb
Remove old BiDi Struct autoload reference                               
+0/-1     
Documentation
5 files
browser.rbs
Update type signature for Window class                                     
+1/-1     
log_handler.rbs
Update type signatures for log entry classes                         
+4/-2     
types.rbs
Add type signatures for Types module                                         
+9/-0     
data.rbs
Add type signature for Data class                                               
+9/-0     
struct.rbs
Add type signature for Struct class                                           
+11/-0   
Additional files
1 files
script.rbs [link]   

@titusfortner titusfortner requested review from aguspe and p0deje October 27, 2025 22:18
@titusfortner titusfortner added the C-rb Ruby Bindings label Oct 27, 2025
@selenium-ci selenium-ci added the B-devtools Includes everything BiDi or Chrome DevTools related label Oct 27, 2025
@qodo-merge-pro
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No new logging: The added code defines data/struct helpers and refactors types but does not add or modify
any audit logging for critical actions.

Referred Code
BASE_LOG_ENTRY = %i[level source text timestamp stacktrace].freeze
ConsoleLogEntry = WebDriver::Types::Struct.define(*BASE_LOG_ENTRY, :method, :args, :type)
JavaScriptLogEntry = WebDriver::Types::Struct.define(*BASE_LOG_ENTRY, :type)

def initialize(bidi)
  @bidi = bidi
  @log_entry_subscribed = false
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Input validation: Argument normalization rejects positional args with a generic message and silently
defaults missing fields to nil, which may need explicit validation or clearer error
context depending on consumers.

Referred Code
def self.normalize_args(args, opts)
  unless args.empty? || (args.length == 1 && args.first.is_a?(Hash))
    raise ArgumentError, 'positional args not allowed; use keywords or a single hash'
  end

  raw = opts.any? ? opts : (args.first || {})
  raw.transform_keys { |k| camel_to_snake(k.to_s).to_sym }
end
Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Key normalization: The generic key normalization accepts arbitrary keys and converts them to symbols without
type/whitelist validation, which may be acceptable for internal use but warrants
verification when handling external inputs.

Referred Code
def self.normalize_args(args, opts)
  unless args.empty? || (args.length == 1 && args.first.is_a?(Hash))
    raise ArgumentError, 'positional args not allowed; use keywords or a single hash'
  end

  raw = opts.any? ? opts : (args.first || {})
  raw.transform_keys { |k| camel_to_snake(k.to_s).to_sym }
end
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label


def self.camel_to_snake(camel)
camel = camel.to_s
camel.gsub(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2')

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on a
library input
may run slow on strings with many repetitions of '0'.
@qodo-merge-pro
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Consider using a dedicated data-modeling gem

Instead of creating custom Data and Struct classes with manual key
transformation, consider using a dedicated data modeling gem like dry-struct.
This would reduce maintenance and provide more robust features like type
coercion and validation.

Examples:

rb/lib/selenium/webdriver/common/types/data.rb [28-41]
      class Data < ::Data
        def self.define(*members, &blk)
          klass = super(*members.map(&:to_sym), &blk)

          klass.singleton_class.prepend(Module.new do
            def new(*args, **opts)
              norm = WebDriver::Types.normalize_args(args, opts)
              super(*members.map { |m| norm[m] })
            end
          end)

 ... (clipped 4 lines)
rb/lib/selenium/webdriver/common/types/struct.rb [23-44]
      class Struct < ::Struct
        class << self
          #
          # A subclass of ::Struct that allows optional, unordered, camel-cased key-value pairs.
          #
          # @api private
          #
          def define(*members, &blk)
            klass = super(*members.map(&:to_sym), keyword_init: true, &blk)


 ... (clipped 12 lines)

Solution Walkthrough:

Before:

# In rb/lib/selenium/webdriver/common/types.rb
class Types
  def self.camel_to_snake(...)
    # ... custom implementation ...
  end

  def self.normalize_args(...)
    # ... custom implementation ...
  end
end

# In rb/lib/selenium/webdriver/common/types/data.rb
class Data < ::Data
  def self.define(*members, &blk)
    klass = super(...)
    # Prepend custom `new` method to handle key transformation
    # and argument normalization manually.
    klass.singleton_class.prepend(...)
    klass
  end
end

After:

# Gemfile
gem 'dry-struct'

# In a new base struct file
require 'dry-struct'

class BaseStruct < Dry::Struct
  # Use the library's built-in key transformation
  transform_keys do |key|
    key.to_s.gsub(/([A-Z])/, '_\1').downcase.to_sym
  end
end

# In rb/lib/selenium/webdriver/bidi/browser.rb
class Window < BaseStruct
  # Use declarative attributes with optional types
  attribute :handle, Dry.Types::String
  attribute :active, Dry.Types::Bool
  attribute? :height, Dry.Types::Integer.optional
  # ...
end
Suggestion importance[1-10]: 8

__

Why: This is a strong architectural suggestion that proposes replacing a custom, maintenance-heavy implementation with a standard, robust third-party library, which is a best practice for foundational code.

Medium
Possible issue
Fix incorrect struct member name

Update the struct member name from :stacktrace to :stack_trace in BASE_LOG_ENTRY
to correctly match the key generated by the camel_to_snake helper.

rb/lib/selenium/webdriver/bidi/log_handler.rb [24]

-BASE_LOG_ENTRY = %i[level source text timestamp stacktrace].freeze
+BASE_LOG_ENTRY = %i[level source text timestamp stack_trace].freeze
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a bug where the stacktrace field would always be nil due to a mismatch between the camel_to_snake conversion (stack_trace) and the defined struct member (:stacktrace).

Medium
  • More

@qodo-merge-pro
Copy link
Contributor

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: Ruby / Local Tests (firefox, windows) / Local Tests (firefox, windows)

Failed stage: Run Bazel [❌]

Failed test name: //rb/spec/integration/selenium/webdriver/bidi:browser-firefox

Failure summary:

The action failed because the test target
//rb/spec/integration/selenium/webdriver/bidi:browser-firefox errored during load. Ruby raised
NameError: uninitialized constant Selenium::WebDriver::Types when evaluating
./rb/lib/selenium/webdriver/bidi/browser.rb at line where it defines Window =
WebDriver::Types::Struct.define(...):
- Error trace points to:
-
./rb/lib/selenium/webdriver/bidi/browser.rb:24 in class:Browser
-
./rb/lib/selenium/webdriver/bidi/browser.rb:23 in class:BiDi
-
./rb/lib/selenium/webdriver/bidi/browser.rb:22 in module:WebDriver
-
./rb/lib/selenium/webdriver/bidi/browser.rb:21 in module:Selenium
-
./rb/lib/selenium/webdriver/bidi/browser.rb:20 in <top (required)>
- and the spec file
./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:25
- As a result, the spec file failed
to load and the test failed in 3 attempts.
- Overall: 27 tests executed, 26 passed, 1 failed,
causing the workflow to exit with code 1.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

555:  ==> Locally signing trusted keys in keyring...
556:  -> Locally signed 5 keys.
557:  ==> Importing owner trust values...
558:  gpg: setting ownertrust to 4
559:  gpg: setting ownertrust to 4
560:  gpg: setting ownertrust to 4
561:  gpg: setting ownertrust to 4
562:  gpg: setting ownertrust to 4
563:  ==> Disabling revoked keys in keyring...
564:  -> Disabled 4 keys.
565:  ==> Updating trust database...
566:  gpg: marginals needed: 3  completes needed: 1  trust model: pgp
567:  gpg: depth: 0  valid:   1  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 1u
568:  gpg: depth: 1  valid:   5  signed:   6  trust: 0-, 0q, 0n, 5m, 0f, 0u
569:  gpg: depth: 2  valid:   3  signed:   2  trust: 3-, 0q, 0n, 0m, 0f, 0u
570:  gpg: error retrieving '[email protected]' via WKD: No data
571:  gpg: error reading key: No data
572:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
573:  gpg: key F40D263ECA25678A: "Alexey Pavlov (Alexpux) <[email protected]>" not changed
574:  gpg: Total number processed: 1
575:  gpg:              unchanged: 1
576:  gpg: error retrieving '[email protected]' via WKD: Try again later
577:  gpg: error reading key: Try again later
578:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
579:  gpg: key 790AE56A1D3CFDDC: "David Macek (MSYS2 master key) <[email protected]>" not changed
580:  gpg: Total number processed: 1
581:  gpg:              unchanged: 1
582:  gpg: error retrieving '[email protected]' via WKD: Try again later
583:  gpg: error reading key: Try again later
584:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
585:  gpg: key DA7EF2ABAEEA755C: "Martell Malone (martell) <[email protected]>" not changed
586:  gpg: Total number processed: 1
587:  gpg:              unchanged: 1
588:  gpg: error retrieving '[email protected]' via WKD: Try again later
589:  gpg: error reading key: Try again later
590:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
591:  gpg: key 755B8182ACD22879: "Christoph Reiter (MSYS2 master key) <[email protected]>" not changed
592:  gpg: Total number processed: 1
593:  gpg:              unchanged: 1
594:  gpg: error retrieving '[email protected]' via WKD: Try again later
595:  gpg: error reading key: Try again later
596:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
597:  gpg: key 9F418C233E652008: "Ignacio Casal Quinteiro <[email protected]>" not changed
598:  gpg: Total number processed: 1
599:  gpg:              unchanged: 1
600:  gpg: error retrieving '[email protected]' via WKD: Try again later
601:  gpg: error reading key: Try again later
602:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
603:  gpg: key BBE514E53E0D0813: "Ray Donnelly (MSYS2 Developer - master key) <[email protected]>" not changed
604:  gpg: Total number processed: 1
605:  gpg:              unchanged: 1
606:  gpg: error retrieving '[email protected]' via WKD: No data
607:  gpg: error reading key: No data
608:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
609:  gpg: key 5F92EFC1A47D45A1: "Alexey Pavlov (Alexpux) <[email protected]>" not changed
610:  gpg: Total number processed: 1
611:  gpg:              unchanged: 1
612:  gpg: error retrieving '[email protected]' via WKD: Try again later
613:  gpg: error reading key: Try again later
614:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
615:  gpg: key 974C8BE49078F532: "David Macek <[email protected]>" 3 new signatures
616:  gpg: key 974C8BE49078F532: "David Macek <[email protected]>" 1 signature cleaned
617:  gpg: Total number processed: 1
618:  gpg:         new signatures: 3
619:  gpg:     signatures cleaned: 1
620:  gpg: marginals needed: 3  completes needed: 1  trust model: pgp
621:  gpg: depth: 0  valid:   1  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 1u
622:  gpg: depth: 1  valid:   5  signed:   7  trust: 0-, 0q, 0n, 5m, 0f, 0u
623:  gpg: depth: 2  valid:   4  signed:   2  trust: 4-, 0q, 0n, 0m, 0f, 0u
624:  gpg: next trustdb check due at 2026-04-10
625:  gpg: error retrieving '[email protected]' via WKD: Try again later
626:  gpg: error reading key: Try again later
627:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
628:  gpg: key FA11531AA0AA7F57: "Christoph Reiter (MSYS2 development key) <[email protected]>" not changed
629:  gpg: Total number processed: 1
630:  gpg:              unchanged: 1
631:  gpg: error retrieving '[email protected]' via WKD: Unknown host
632:  gpg: error reading key: Unknown host
633:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
634:  gpg: key 794DCF97F93FC717: "Martell Malone (martell) <[email protected]>" not changed
635:  gpg: Total number processed: 1
636:  gpg:              unchanged: 1
637:  gpg: error retrieving '[email protected]' via WKD: Try again later
638:  gpg: error reading key: Try again later
639:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
640:  gpg: key D595C9AB2C51581E: "Martell Malone (MSYS2 Developer) <[email protected]>" not changed
641:  gpg: Total number processed: 1
642:  gpg:              unchanged: 1
643:  gpg: error retrieving '[email protected]' via WKD: Try again later
644:  gpg: error reading key: Try again later
645:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
...

727:  installing mingw-w64-ucrt-x86_64-p11-kit...
728:  installing mingw-w64-ucrt-x86_64-ca-certificates...
729:  installing mingw-w64-ucrt-x86_64-openssl...
730:  Optional dependencies for mingw-w64-ucrt-x86_64-openssl
731:  mingw-w64-ucrt-x86_64-ca-certificates [installed]
732:  installing mingw-w64-ucrt-x86_64-libssh2...
733:  installing mingw-w64-ucrt-x86_64-nghttp2...
734:  installing mingw-w64-ucrt-x86_64-nghttp3...
735:  installing mingw-w64-ucrt-x86_64-curl...
736:  installing mingw-w64-ucrt-x86_64-libyaml...
737:  �[32mAnalyzing:�[0m 27 targets (343 packages loaded, 9571 targets configured)
738:  �[32mAnalyzing:�[0m 27 targets (344 packages loaded, 9571 targets configured)
739:  �[32mAnalyzing:�[0m 27 targets (344 packages loaded, 43362 targets configured)
740:  �[32m[1 / 1]�[0m no actions running
741:  �[32mAnalyzing:�[0m 27 targets (344 packages loaded, 43374 targets configured)
742:  �[32m[6 / 32]�[0m [Prepa] Creating source manifest for //rb/spec/integration/selenium/webdriver:error-firefox ... (3 actions, 1 running)
743:  �[32mAnalyzing:�[0m 27 targets (344 packages loaded, 43382 targets configured)
744:  �[32m[24 / 231]�[0m Creating source manifest for //rb/spec/integration/selenium/webdriver:error-firefox; 0s local ... (4 actions running)
745:  �[32mAnalyzing:�[0m 27 targets (344 packages loaded, 43382 targets configured)
...

964:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
965:  �[32mINFO: �[0mFrom Compiling src/google/protobuf/port.cc [for tool]:
966:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
967:  �[32mINFO: �[0mFrom Compiling absl/container/internal/hashtablez_sampler.cc [for tool]:
968:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
969:  �[32mINFO: �[0mFrom Compiling absl/log/internal/log_format.cc [for tool]:
970:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
971:  �[32mINFO: �[0mFrom Compiling absl/container/internal/hashtablez_sampler_force_weak_definition.cc [for tool]:
972:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
973:  �[32mINFO: �[0mFrom Compiling absl/strings/internal/cordz_functions.cc [for tool]:
974:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
975:  �[32mINFO: �[0mFrom Compiling absl/profiling/internal/exponential_biased.cc [for tool]:
976:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
977:  �[32mINFO: �[0mFrom Compiling src/google/protobuf/compiler/rust/relative_path.cc [for tool]:
978:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
979:  �[32mINFO: �[0mFrom Compiling absl/base/internal/strerror.cc [for tool]:
980:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
...

1805:  �[32m[1,090 / 1,112]�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-firefox; 7s disk-cache ... (4 actions, 0 running)
1806:  �[32m[1,090 / 1,112]�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-firefox; 38s disk-cache ... (4 actions, 0 running)
1807:  �[32m[1,090 / 1,112]�[0m Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-firefox; 49s disk-cache ... (4 actions, 0 running)
1808:  �[32m[1,090 / 1,112]�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-firefox; 1s local, disk-cache ... (4 actions, 1 running)
1809:  �[32m[1,090 / 1,112]�[0m Testing //rb/spec/integration/selenium/webdriver:shadow_root-firefox; 30s local, disk-cache ... (4 actions, 2 running)
1810:  �[32m[1,091 / 1,112]�[0m 1 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/firefox:driver-firefox; 32s ... (4 actions, 1 running)
1811:  �[32m[1,092 / 1,112]�[0m 2 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:action_builder-firefox; 33s ... (4 actions, 1 running)
1812:  �[32m[1,092 / 1,112]�[0m 2 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:action_builder-firefox; 34s ... (4 actions, 1 running)
1813:  �[32m[1,092 / 1,112]�[0m 2 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:action_builder-firefox; 44s ... (4 actions, 1 running)
1814:  �[32m[1,092 / 1,112]�[0m 2 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:action_builder-firefox; 59s ... (4 actions, 1 running)
1815:  �[32m[1,093 / 1,112]�[0m 3 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:target_locator-firefox; 27s disk-cache ... (4 actions, 1 running)
1816:  �[32m[1,093 / 1,112]�[0m 3 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:target_locator-firefox; 28s disk-cache ... (4 actions, 1 running)
1817:  �[32m[1,093 / 1,112]�[0m 3 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-firefox; 4s ... (4 actions, 1 running)
1818:  �[32m[1,093 / 1,112]�[0m 3 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-firefox; 12s ... (4 actions, 1 running)
1819:  �[32m[1,093 / 1,112]�[0m 3 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:action_builder-firefox; 21s local, disk-cache ... (4 actions, 2 running)
1820:  �[32m[1,094 / 1,112]�[0m 4 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:error-firefox; 21s disk-cache ... (4 actions, 1 running)
1821:  �[32m[1,094 / 1,112]�[0m 4 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:target_locator-firefox; 21s ... (4 actions, 1 running)
1822:  �[32m[1,094 / 1,112]�[0m 4 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:target_locator-firefox; 29s ... (4 actions, 1 running)
1823:  �[32m[1,094 / 1,112]�[0m 4 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-firefox; 14s local, disk-cache ... (4 actions, 2 running)
1824:  �[32m[1,095 / 1,112]�[0m 5 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:element-firefox; 13s disk-cache ... (4 actions, 1 running)
1825:  �[32m[1,095 / 1,112]�[0m 5 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:element-firefox; 24s disk-cache ... (4 actions, 1 running)
1826:  �[32m[1,095 / 1,112]�[0m 5 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:error-firefox; 24s ... (4 actions, 1 running)
1827:  �[32m[1,095 / 1,112]�[0m 5 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:target_locator-firefox; 18s local, disk-cache ... (4 actions, 2 running)
1828:  �[32m[1,096 / 1,112]�[0m 6 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/firefox:profile-firefox; 18s disk-cache ... (4 actions, 1 running)
1829:  �[32m[1,096 / 1,112]�[0m 6 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/firefox:profile-firefox; 20s disk-cache ... (4 actions, 1 running)
1830:  �[32m[1,096 / 1,112]�[0m 6 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/firefox:profile-firefox; 29s disk-cache ... (4 actions, 1 running)
1831:  �[32m[1,096 / 1,112]�[0m 6 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:element-firefox; 17s ... (4 actions, 1 running)
1832:  �[32m[1,096 / 1,112]�[0m 6 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:error-firefox; 15s local, disk-cache ... (4 actions, 2 running)
1833:  �[32m[1,097 / 1,112]�[0m 7 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:navigation-firefox; 15s disk-cache ... (4 actions, 1 running)
...

1894:  �[32m[1,113 / 1,114]�[0m 23 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:script-firefox
1895:  �[32m[1,113 / 1,114]�[0m 23 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-firefox; 1s local, disk-cache
1896:  �[32m[1,113 / 1,114]�[0m 23 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-firefox; 2s local, disk-cache
1897:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 1s disk-cache
1898:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox
1899:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 1s local, disk-cache
1900:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 2s local, disk-cache
1901:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/bidi:browser-firefox (see D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test_attempts/attempt_1.log)
1902:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 4s local, disk-cache
1903:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 6s local, disk-cache
1904:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/bidi:browser-firefox (see D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test_attempts/attempt_2.log)
1905:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 8s local, disk-cache
1906:  �[32m[1,114 / 1,115]�[0m 24 / 27 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox; 9s local, disk-cache
1907:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/bidi:browser-firefox (see D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test.log)
1908:  ==================== Test output for //rb/spec/integration/selenium/webdriver/bidi:browser-firefox:
1909:  �[31m�[1mFAILED: �[0m//rb/spec/integration/selenium/webdriver/bidi:browser-firefox (Summary)
1910:  D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test.log
1911:  An error occurred while loading ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb.
1912:  D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test_attempts/attempt_1.log
1913:  D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test_attempts/attempt_2.log
1914:  Failure/Error:
1915:  �[32mINFO: �[0mFrom Testing //rb/spec/integration/selenium/webdriver/bidi:browser-firefox:
1916:  Window = WebDriver::Types::Struct.define(:handle, :active, :height, :width, :x, :y, :state) do
1917:  def active?
1918:  active
1919:  end
1920:  end
1921:  NameError:
1922:  uninitialized constant Selenium::WebDriver::Types
1923:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:24:in `<class:Browser>'
1924:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:23:in `<class:BiDi>'
1925:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:22:in `<module:WebDriver>'
1926:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:21:in `<module:Selenium>'
1927:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:20:in `<top (required)>'
1928:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:25:in `<class:BiDi>'
1929:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:24:in `<module:WebDriver>'
1930:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:23:in `<module:Selenium>'
1931:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:22:in `<top (required)>'
1932:  All examples were filtered out; ignoring {}
1933:  No examples found.
1934:  Finished in 0.00005 seconds (files took 1.09 seconds to load)
1935:  0 examples, 0 failures, 1 error occurred outside of examples
1936:  ================================================================================
1937:  ==================== Test output for //rb/spec/integration/selenium/webdriver/bidi:browser-firefox:
1938:  An error occurred while loading ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb.
1939:  Failure/Error:
1940:  Window = WebDriver::Types::Struct.define(:handle, :active, :height, :width, :x, :y, :state) do
1941:  def active?
1942:  active
1943:  end
1944:  end
1945:  NameError:
1946:  uninitialized constant Selenium::WebDriver::Types
1947:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:24:in `<class:Browser>'
1948:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:23:in `<class:BiDi>'
1949:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:22:in `<module:WebDriver>'
1950:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:21:in `<module:Selenium>'
1951:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:20:in `<top (required)>'
1952:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:25:in `<class:BiDi>'
1953:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:24:in `<module:WebDriver>'
1954:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:23:in `<module:Selenium>'
1955:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:22:in `<top (required)>'
1956:  All examples were filtered out; ignoring {}
1957:  No examples found.
1958:  Finished in 0.00005 seconds (files took 1.07 seconds to load)
1959:  0 examples, 0 failures, 1 error occurred outside of examples
1960:  ================================================================================
1961:  ==================== Test output for //rb/spec/integration/selenium/webdriver/bidi:browser-firefox:
1962:  An error occurred while loading ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb.
1963:  Failure/Error:
1964:  Window = WebDriver::Types::Struct.define(:handle, :active, :height, :width, :x, :y, :state) do
1965:  def active?
1966:  active
1967:  end
1968:  end
1969:  NameError:
1970:  uninitialized constant Selenium::WebDriver::Types
1971:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:24:in `<class:Browser>'
1972:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:23:in `<class:BiDi>'
1973:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:22:in `<module:WebDriver>'
1974:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:21:in `<module:Selenium>'
1975:  # ./rb/lib/selenium/webdriver/bidi/browser.rb:20:in `<top (required)>'
1976:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:25:in `<class:BiDi>'
1977:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:24:in `<module:WebDriver>'
1978:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:23:in `<module:Selenium>'
1979:  # ./rb/spec/integration/selenium/webdriver/bidi/browser_spec.rb:22:in `<top (required)>'
1980:  All examples were filtered out; ignoring {}
1981:  No examples found.
1982:  Finished in 0.00005 seconds (files took 1.06 seconds to load)
1983:  0 examples, 0 failures, 1 error occurred outside of examples
1984:  ================================================================================
1985:  �[32m[1,115 / 1,116]�[0m 25 / 27 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-firefox; 0s disk-cache
1986:  �[32m[1,115 / 1,116]�[0m 25 / 27 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:devtools-firefox
1987:  �[32m[1,115 / 1,116]�[0m 25 / 27 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-firefox; 1s local, disk-cache
1988:  �[32m[1,116 / 1,117]�[0m 26 / 27 tests, �[31m�[1m1 failed�[0m;�[0m [Prepa] Testing //rb/spec/integration/selenium/webdriver/bidi:network-firefox
1989:  �[32m[1,116 / 1,117]�[0m 26 / 27 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-firefox; 0s disk-cache
1990:  �[32m[1,116 / 1,117]�[0m 26 / 27 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:network-firefox
1991:  �[32m[1,116 / 1,117]�[0m 26 / 27 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-firefox; 1s local, disk-cache
1992:  �[32m[1,116 / 1,117]�[0m 26 / 27 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-firefox; 3s local, disk-cache
1993:  �[32mINFO: �[0mFound 27 test targets...
1994:  �[32mINFO: �[0mElapsed time: 1123.625s, Critical Path: 592.43s
1995:  �[32mINFO: �[0m1117 processes: 554 disk cache hit, 495 internal, 68 local.
1996:  �[32mINFO: �[0mBuild completed, 1 test FAILED, 1117 total actions
1997:  //rb/spec/integration/selenium/webdriver:action_builder-firefox          �[0m�[32mPASSED�[0m in 21.2s
1998:  //rb/spec/integration/selenium/webdriver:bidi-firefox                    �[0m�[32mPASSED�[0m in 3.7s
1999:  //rb/spec/integration/selenium/webdriver:devtools-firefox                �[0m�[32mPASSED�[0m in 2.7s
2000:  //rb/spec/integration/selenium/webdriver:driver-firefox                  �[0m�[32mPASSED�[0m in 19.9s
2001:  //rb/spec/integration/selenium/webdriver:element-firefox                 �[0m�[32mPASSED�[0m in 37.7s
2002:  //rb/spec/integration/selenium/webdriver:error-firefox                   �[0m�[32mPASSED�[0m in 15.7s
2003:  //rb/spec/integration/selenium/webdriver:fedcm-firefox                   �[0m�[32mPASSED�[0m in 52.9s
...

2008:  //rb/spec/integration/selenium/webdriver:select-firefox                  �[0m�[32mPASSED�[0m in 18.5s
2009:  //rb/spec/integration/selenium/webdriver:shadow_root-firefox             �[0m�[32mPASSED�[0m in 30.4s
2010:  //rb/spec/integration/selenium/webdriver:takes_screenshot-firefox        �[0m�[32mPASSED�[0m in 14.3s
2011:  //rb/spec/integration/selenium/webdriver:target_locator-firefox          �[0m�[32mPASSED�[0m in 18.6s
2012:  //rb/spec/integration/selenium/webdriver:timeout-firefox                 �[0m�[32mPASSED�[0m in 15.8s
2013:  //rb/spec/integration/selenium/webdriver:virtual_authenticator-firefox   �[0m�[32mPASSED�[0m in 2.9s
2014:  //rb/spec/integration/selenium/webdriver:window-firefox                  �[0m�[32mPASSED�[0m in 17.1s
2015:  //rb/spec/integration/selenium/webdriver/bidi:browsing_context-firefox   �[0m�[32mPASSED�[0m in 2.8s
2016:  //rb/spec/integration/selenium/webdriver/bidi:network-firefox            �[0m�[32mPASSED�[0m in 3.0s
2017:  //rb/spec/integration/selenium/webdriver/bidi:script-firefox             �[0m�[32mPASSED�[0m in 2.6s
2018:  //rb/spec/integration/selenium/webdriver/firefox:driver-firefox          �[0m�[32mPASSED�[0m in 27.5s
2019:  //rb/spec/integration/selenium/webdriver/firefox:profile-firefox         �[0m�[32mPASSED�[0m in 20.7s
2020:  //rb/spec/integration/selenium/webdriver/firefox:service-firefox         �[0m�[32mPASSED�[0m in 4.4s
2021:  //rb/spec/integration/selenium/webdriver/remote:driver-firefox           �[0m�[32mPASSED�[0m in 2.8s
2022:  //rb/spec/integration/selenium/webdriver/remote:element-firefox          �[0m�[32mPASSED�[0m in 8.5s
2023:  //rb/spec/integration/selenium/webdriver/bidi:browser-firefox            �[0m�[31m�[1mFAILED�[0m in 3 out of 3 in 2.7s
2024:  Stats over 3 runs: max = 2.7s, min = 2.6s, avg = 2.6s, dev = 0.0s
2025:  D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test.log
2026:  D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test_attempts/attempt_1.log
2027:  D:/b/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/bidi/browser-firefox/test_attempts/attempt_2.log
2028:  Executed 27 out of 27 tests: 26 tests pass and �[0m�[31m�[1m1 fails locally�[0m.
2029:  There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
2030:  �[0m
2031:  ##[error]Process completed with exit code 1.
2032:  Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-devtools Includes everything BiDi or Chrome DevTools related C-rb Ruby Bindings Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants