You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a details/summary to the shortcode to optionally display the entire file on the website directly
Start breaking out tests so it is only one per file
Some random fixes that ended up in here as well
Motivation and Context
We don't want to clutter the documentation with boilerplate code by default, but people often want more context than just the one or two lines that make the method call. This highlights the code we care about and then allows you to display the whole file.
If we're displaying the whole file, it makes sense to split the tests so it is one test per file.
This will also make it much easier to manage line number references. If you make a change to a file, you only need to update the line numbers in one place rather than a bunch of places.
I can't see what I need locally, so using netlify to demo it...
PR Type
Enhancement, Tests, Documentation
Description
Added an optional "Show full example" toggle in code snippets.
Split Ruby test cases into individual files for better organization.
Updated documentation to reflect new file paths and line numbers.
The refactored test creates local variables (driver, text_box, etc.) but doesn't initialize them before use in the expectations. This could lead to undefined variable errors if the test execution fails at any point.
The new code adds a "Show full example" toggle, but the condition for displaying it ($hasFragment) might not correctly handle all cases where fragments are present in the URL.
The chrome_location method sets environment variables but doesn't actually return the browser path. Since the method is called to set the binary location, it should return the browser path value.
def chrome_location
options = default_chrome_options
service = Selenium::WebDriver::Service.chrome
finder = Selenium::WebDriver::DriverFinder.new(options, service)
ENV['CHROMEDRIVER_BIN'] = finder.driver_path
ENV['CHROME_BIN'] = finder.browser_path
+ finder.browser_path
end
Apply this suggestion
Suggestion importance[1-10]: 8
__
Why: The chrome_location method sets environment variables but doesn't return any value, despite being used to set the binary location. Adding a return statement for finder.browser_path ensures the method returns the actual browser path, making it work correctly when called in options.binary = chrome_location.
Failed test name: Remote WebDriver starts remotely
Failure summary:
The action failed because of type errors in the Ruby tests related to Remote WebDriver functionality. Specifically, three tests failed with the same error:
"Remote WebDriver starts remotely" (line 19 in remote_webdriver_spec.rb)
"Remote WebDriver uploads" (line 26 in remote_webdriver_spec.rb)
"Remote WebDriver downloads" (line 42 in remote_webdriver_spec.rb)
All failures show the same TypeError: "no implicit conversion of String into Integer" when calling Selenium::Server.get(:latest, background: true, args: %w[--selenium-manager true --enable-managed-downloads true]) at line 10 in remote_webdriver_spec.rb. This suggests there's an issue with how arguments are being passed to the Selenium Server, where a string is being provided where an integer is expected.
Relevant error logs:
1: ##[group]Operating System2: macOS
...
277: Creating settings.xml with server-id: github278: Writing to /Users/runner/.m2/settings.xml279: ##[group]Run nick-invision/[email protected]280: with:281: timeout_minutes: 20282: max_attempts: 2283: command: cd examples/ruby284: bundle exec rspec285:
286: new_command_on_retry: cd examples/ruby287: DEBUG=true bundle exec rspec --only-failures --backtrace288:
289: retry_wait_seconds: 10290: polling_interval_seconds: 1291: warning_on_retry: true292: continue_on_error: false293: env:
...
402: # ./spec/elements/locators_spec.rb:43403: 34) Element Locators with relative locators finds element to the left404: # These are reference following the documentation example405: # ./spec/elements/locators_spec.rb:47406: 35) Element Locators with relative locators finds element to the right407: # These are reference following the documentation example408: # ./spec/elements/locators_spec.rb:51409: 36) Element Locators with relative locators finds near element410: # These are reference following the documentation example411: # ./spec/elements/locators_spec.rb:55412: 37) Element Locators with relative locators chains relative locators413: # These are reference following the documentation example414: # ./spec/elements/locators_spec.rb:59415: Failures:416: 1) Remote WebDriver starts remotely417: Got 0 failures and 2 other errors:418: 1.1) Failure/Error:419: Selenium::Server.get(:latest,420: background: true,421: args: %w[--selenium-manager true --enable-managed-downloads true])422: TypeError:423: no implicit conversion of String into Integer424: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in <top (required)>'425: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in <top (required)>'426: 1.2) Failure/Error:427: Selenium::Server.get(:latest,428: background: true,429: args: %w[--selenium-manager true --enable-managed-downloads true])430: TypeError:431: no implicit conversion of String into Integer432: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in <top (required)>'433: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in <top (required)>'434: 2) Remote WebDriver uploads435: Got 0 failures and 2 other errors:436: 2.1) Failure/Error:437: Selenium::Server.get(:latest,438: background: true,439: args: %w[--selenium-manager true --enable-managed-downloads true])440: TypeError:441: no implicit conversion of String into Integer442: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in <top (required)>'443: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in <top (required)>'444: 2.2) Failure/Error:445: Selenium::Server.get(:latest,446: background: true,447: args: %w[--selenium-manager true --enable-managed-downloads true])448: TypeError:449: no implicit conversion of String into Integer450: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in <top (required)>'451: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in <top (required)>'452: 3) Remote WebDriver downloads453: Got 0 failures and 2 other errors:454: 3.1) Failure/Error:455: Selenium::Server.get(:latest,456: background: true,457: args: %w[--selenium-manager true --enable-managed-downloads true])458: TypeError:459: no implicit conversion of String into Integer460: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in <top (required)>'461: # ./spec/drivers/remote_webdriver_spec.rb:16:in `block (2 levels) in <top (required)>'462: 3.2) Failure/Error:463: Selenium::Server.get(:latest,464: background: true,465: args: %w[--selenium-manager true --enable-managed-downloads true])466: TypeError:467: no implicit conversion of String into Integer468: # ./spec/drivers/remote_webdriver_spec.rb:10:in `block (2 levels) in <top (required)>'469: # ./spec/drivers/remote_webdriver_spec.rb:17:in `block (2 levels) in <top (required)>'470: Finished in 6 minutes 23 seconds (files took 0.28928 seconds to load)471: 191 examples, 3 failures, 37 pending472: Failed examples:473: rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely474: rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads475: rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads476: ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 1477: ##[endgroup]478: ##[group]Attempt 2479: Run options: include {:last_run_status=>"failed"}480: FFF481: Failures:482: 1) Remote WebDriver starts remotely483: Got 0 failures and 2 other errors:484: 1.1) Failure/Error:485: Selenium::Server.get(:latest,486: background: true,487: args: %w[--selenium-manager true --enable-managed-downloads true])488: TypeError:489: no implicit conversion of String into Integer
...
545: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'546: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<top (required)>'547: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `load'548: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `<top (required)>'549: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load'550: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load'551: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'552: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'553: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'554: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'555: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'556: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'557: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'558: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'559: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'560: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'561: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'562: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `load'563: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `<main>'564: 1.2) Failure/Error:565: Selenium::Server.get(:latest,566: background: true,567: args: %w[--selenium-manager true --enable-managed-downloads true])568: TypeError:569: no implicit conversion of String into Integer
...
625: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'626: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<top (required)>'627: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `load'628: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `<top (required)>'629: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load'630: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load'631: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'632: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'633: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'634: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'635: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'636: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'637: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'638: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'639: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'640: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'641: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'642: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `load'643: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `<main>'644: 2) Remote WebDriver uploads645: Got 0 failures and 2 other errors:646: 2.1) Failure/Error:647: Selenium::Server.get(:latest,648: background: true,649: args: %w[--selenium-manager true --enable-managed-downloads true])650: TypeError:651: no implicit conversion of String into Integer
...
707: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'708: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<top (required)>'709: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `load'710: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `<top (required)>'711: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load'712: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load'713: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'714: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'715: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'716: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'717: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'718: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'719: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'720: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'721: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'722: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'723: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'724: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `load'725: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `<main>'726: 2.2) Failure/Error:727: Selenium::Server.get(:latest,728: background: true,729: args: %w[--selenium-manager true --enable-managed-downloads true])730: TypeError:731: no implicit conversion of String into Integer
...
787: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'788: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<top (required)>'789: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `load'790: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `<top (required)>'791: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load'792: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load'793: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'794: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'795: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'796: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'797: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'798: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'799: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'800: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'801: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'802: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'803: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'804: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `load'805: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `<main>'806: 3) Remote WebDriver downloads807: Got 0 failures and 2 other errors:808: 3.1) Failure/Error:809: Selenium::Server.get(:latest,810: background: true,811: args: %w[--selenium-manager true --enable-managed-downloads true])812: TypeError:813: no implicit conversion of String into Integer
...
869: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'870: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<top (required)>'871: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `load'872: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `<top (required)>'873: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load'874: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load'875: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'876: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'877: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'878: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'879: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'880: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'881: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'882: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'883: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'884: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'885: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'886: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `load'887: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `<main>'888: 3.2) Failure/Error:889: Selenium::Server.get(:latest,890: background: true,891: args: %w[--selenium-manager true --enable-managed-downloads true])892: TypeError:893: no implicit conversion of String into Integer
...
949: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/lib/rspec/core/runner.rb:45:in `invoke'950: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/rspec-core-3.13.0/exe/rspec:4:in `<top (required)>'951: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `load'952: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/rspec:25:in `<top (required)>'953: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `load'954: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in `kernel_load'955: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in `run'956: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in `exec'957: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'958: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'959: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'960: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in `dispatch'961: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'962: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in `start'963: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:28:in `block in <top (required)>'964: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'965: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/lib/ruby/gems/3.1.0/gems/bundler-2.5.6/exe/bundle:20:in `<top (required)>'966: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `load'967: # /Users/runner/hostedtoolcache/Ruby/3.1.7/arm64/bin/bundle:25:in `<main>'968: Finished in 1.08 seconds (files took 0.31718 seconds to load)969: 3 examples, 3 failures970: Failed examples:971: rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely972: rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads973: rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads974: ##[endgroup]975: ##[error]Final attempt failed. Child_process exited with error code 1976: Post job cleanup.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Description
Motivation and Context
We don't want to clutter the documentation with boilerplate code by default, but people often want more context than just the one or two lines that make the method call. This highlights the code we care about and then allows you to display the whole file.
If we're displaying the whole file, it makes sense to split the tests so it is one test per file.
This will also make it much easier to manage line number references. If you make a change to a file, you only need to update the line numbers in one place rather than a bunch of places.
I can't see what I need locally, so using netlify to demo it...
PR Type
Enhancement, Tests, Documentation
Description
Added an optional "Show full example" toggle in code snippets.
Split Ruby test cases into individual files for better organization.
Updated documentation to reflect new file paths and line numbers.
Minor fixes and improvements in Ruby test files.
Changes walkthrough 📝
1 files
Add "Show full example" toggle for code snippets
1 files
Add frozen string literal and minor fixes
7 files
Add test for Chrome options arguments
Add test for basic Chrome options
Add test for setting Chrome binary location
Add test for keeping Chrome browser open
Add test for excluding Chrome switches
Add test for adding Chrome extensions
Refactor and simplify getting started Selenium test
9 files
Update Ruby code snippet references for BiDi logging
Update Ruby code snippet references for BiDi logging (Japanese)
Update Ruby code snippet references for BiDi logging (Portuguese)
Update Ruby code snippet references for BiDi logging (Chinese)
Update Ruby code snippet references for Chrome options
Update Ruby code snippet references for getting started
Update Ruby code snippet references for getting started (Japanese)
Update Ruby code snippet references for getting started (Portuguese)
Update Ruby code snippet references for getting started (Chinese)