Skip to content

Try optionally displaying the full file #2273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed

Conversation

titusfortner
Copy link
Member

@titusfortner titusfortner commented Apr 18, 2025

User description

Description

  • 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.

  • Minor fixes and improvements in Ruby test files.


Changes walkthrough 📝

Relevant files
Enhancement
1 files
gh-codeblock.html
Add "Show full example" toggle for code snippets                 
+9/-3     
Bug fix
1 files
logging_spec.rb
Add frozen string literal and minor fixes                               
+2/-0     
Tests
7 files
arguments_spec.rb
Add test for Chrome options arguments                                       
+13/-0   
basic_spec.rb
Add test for basic Chrome options                                               
+10/-0   
binary_spec.rb
Add test for setting Chrome binary location                           
+23/-0   
detach_spec.rb
Add test for keeping Chrome browser open                                 
+13/-0   
exclude_switches_spec.rb
Add test for excluding Chrome switches                                     
+13/-0   
extensions_spec.rb
Add test for adding Chrome extensions                                       
+18/-0   
using_selenium_spec.rb
Refactor and simplify getting started Selenium test           
+10/-11 
Documentation
9 files
logging.en.md
Update Ruby code snippet references for BiDi logging         
+4/-4     
logging.ja.md
Update Ruby code snippet references for BiDi logging (Japanese)
+4/-4     
logging.pt-br.md
Update Ruby code snippet references for BiDi logging (Portuguese)
+4/-4     
logging.zh-cn.md
Update Ruby code snippet references for BiDi logging (Chinese)
+4/-4     
chrome.en.md
Update Ruby code snippet references for Chrome options     
+6/-6     
using_selenium.en.md
Update Ruby code snippet references for getting started   
+3/-3     
using_selenium.ja.md
Update Ruby code snippet references for getting started (Japanese)
+3/-3     
using_selenium.pt-br.md
Update Ruby code snippet references for getting started (Portuguese)
+3/-3     
using_selenium.zh-cn.md
Update Ruby code snippet references for getting started (Chinese)
+3/-3     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Variable Scope

    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.

    title = driver.title
    expect(title).to eq('Web form')
    
    driver.manage.timeouts.implicit_wait = 500
    
    text_box = driver.find_element(name: 'my-text')
    submit_button = driver.find_element(tag_name: 'button')
    
    text_box.send_keys('Selenium')
    submit_button.click
    
    message = driver.find_element(id: 'message')
    value = message.text
    expect(value).to eq('Received!')
    
    driver.quit
    Conditional Logic

    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.

    {{ $hasFragment := in $fullPath "#" }}
    
    {{ $apiUrl := printf "%s/%s/%s/contents%s?ref=%s" $apiBaseUrl $org $repo $path $branch }}
    {{ $webUrl := printf "%s/%s/%s/blob/%s/%s" $webBaseUrl $org $repo $branch $fullPath }}
    
    {{ $slicedPath := split $path "/" }}
    {{ $language := index (last 1 (split (index (last 1 $slicedPath) 0) ".")) 0 }}
    
    {{ $githubToken := (getenv "SELENIUM_CI_TOKEN") }}
    {{ if $githubToken }}
      {{ $toReplace := printf "://%s@" $githubToken }}
      {{ $tokenInUrl := cond (eq $githubToken "") "://" $toReplace }}
      {{ $apiUrlWithToken := replace $apiUrl "://" $tokenInUrl }}
    
      {{ $apiResults := getJSON $apiUrlWithToken  }}
      {{ $content := base64Decode $apiResults.content }}
      {{ $codeSnippet := $content }}
    
      {{ $parsedApiUrl := urls.Parse $webUrl }}
      {{ with $parsedApiUrl.Fragment }}
        {{ $codeLines := split $parsedApiUrl.Fragment "-" }}
        {{ $fromLine := sub (int (replace (index $codeLines 0) "L" "")) 1 }}
        {{ $toLine := int (cond (eq (len $codeLines) 1) (replace (index $codeLines 0) "L" "") (replace (index $codeLines 1) "L" "")) }}
        {{ $numOfLines := cond (eq (sub $toLine $fromLine) 0) 1 (sub $toLine $fromLine) }}
        {{ $splitContent := split $content "\n" }}
        {{ $codeSnippet = delimit (first $numOfLines (after $fromLine $splitContent)) "\n" }}
      {{ end }}
    
      {{ highlight $codeSnippet $language }}
    
    {{ if $hasFragment }}
    <details class="mt-2">
      <summary>Show full example</summary>
      <div class="pt-2">{{ highlight $content $language }}</div>
    </details>
    {{ end }}

    Copy link
    Contributor

    qodo-merge-pro bot commented Apr 18, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Return browser path value

    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.

    examples/ruby/spec/browsers/chrome/options/binary_spec.rb [16-22]

     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.

    Medium
    • Update

    Copy link

    netlify bot commented Apr 18, 2025

    Deploy Preview for selenium-dev ready!

    Name Link
    🔨 Latest commit 1cd4dac
    🔍 Latest deploy log https://app.netlify.com/sites/selenium-dev/deploys/6801ed136dafde0008f3b4a7
    😎 Deploy Preview https://deploy-preview-2273--selenium-dev.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Contributor

    qodo-merge-pro bot commented Apr 18, 2025

    CI Feedback 🧐

    (Feedback updated until commit 1cd4dac)

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

    Action: tests (macos, stable)

    Failed stage: Run tests on macos [❌]

    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 System
    2:  macOS
    ...
    
    277:  Creating settings.xml with server-id: github
    278:  Writing to /Users/runner/.m2/settings.xml
    279:  ##[group]Run nick-invision/[email protected]
    280:  with:
    281:  timeout_minutes: 20
    282:  max_attempts: 2
    283:  command: cd examples/ruby
    284:  bundle exec rspec
    285:  
    286:  new_command_on_retry: cd examples/ruby
    287:  DEBUG=true bundle exec rspec --only-failures --backtrace
    288:  
    289:  retry_wait_seconds: 10
    290:  polling_interval_seconds: 1
    291:  warning_on_retry: true
    292:  continue_on_error: false
    293:  env:
    ...
    
    402:  # ./spec/elements/locators_spec.rb:43
    403:  34) Element Locators with relative locators finds element to the left
    404:  # These are reference following the documentation example
    405:  # ./spec/elements/locators_spec.rb:47
    406:  35) Element Locators with relative locators finds element to the right
    407:  # These are reference following the documentation example
    408:  # ./spec/elements/locators_spec.rb:51
    409:  36) Element Locators with relative locators finds near element
    410:  # These are reference following the documentation example
    411:  # ./spec/elements/locators_spec.rb:55
    412:  37) Element Locators with relative locators chains relative locators
    413:  # These are reference following the documentation example
    414:  # ./spec/elements/locators_spec.rb:59
    415:  Failures:
    416:  1) Remote WebDriver starts remotely
    417:  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 Integer
    424:  # ./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 Integer
    432:  # ./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 uploads
    435:  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 Integer
    442:  # ./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 Integer
    450:  # ./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 downloads
    453:  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 Integer
    460:  # ./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 Integer
    468:  # ./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 pending
    472:  Failed examples:
    473:  rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely
    474:  rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads
    475:  rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads
    476:  ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 1
    477:  ##[endgroup]
    478:  ##[group]Attempt 2
    479:  Run options: include {:last_run_status=>"failed"}
    480:  FFF
    481:  Failures:
    482:  1) Remote WebDriver starts remotely
    483:  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 uploads
    645:  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 downloads
    807:  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 failures
    970:  Failed examples:
    971:  rspec ./spec/drivers/remote_webdriver_spec.rb:19 # Remote WebDriver starts remotely
    972:  rspec ./spec/drivers/remote_webdriver_spec.rb:26 # Remote WebDriver uploads
    973:  rspec ./spec/drivers/remote_webdriver_spec.rb:42 # Remote WebDriver downloads
    974:  ##[endgroup]
    975:  ##[error]Final attempt failed. Child_process exited with error code 1
    976:  Post job cleanup.
    

    @titusfortner
    Copy link
    Member Author

    Nopety nope. We can probably get this to work, but it'll involve more hacking on the tab shortcode, not just the gh-codeblock shortcode

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

    Successfully merging this pull request may close these issues.

    1 participant