Skip to content

[πŸ› Bug]: Selenium::WebDriver::SeleniumManager.binary errors if cannot find spec filureΒ #14925

@voxik

Description

@voxik

What happened?

Trying to execute the Ruby selenium-webdroverhe test suite, I observe Selenium::WebDriver::SeleniumManager.binary errors if cannot find spec error.

Reading the code, I can't see that File.exist?, which is stubbed by the test case, would be anywhere as part of the Selenium::WebDriver::SeleniumManager.binary call. But then why you don't see the failure upstream? Sorry, I cannot wrap my head about the usage of Bazel and where I could spot the error in GH actions 🀷

How can we reproduce the issue?

$ rspec spec/unit/selenium/webdriver/common/selenium_manager_spec.rb:61
Run options: include {:locations=>{"./spec/unit/selenium/webdriver/common/selenium_manager_spec.rb"=>[61]}}

Selenium::WebDriver::SeleniumManager
  .binary
    errors if cannot find (FAILED - 1)

Failures:

  1) Selenium::WebDriver::SeleniumManager.binary errors if cannot find
     Failure/Error: expect { described_class.send(:binary) }.to raise_error(Error::WebDriverError, /not a file/)
       expected Selenium::WebDriver::Error::WebDriverError with message matching /not a file/ but nothing was raised
     # ./spec/unit/selenium/webdriver/common/selenium_manager_spec.rb:64:in `block (3 levels) in <module:WebDriver>'
     # /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'

Finished in 0.00954 seconds (files took 0.201 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/selenium/webdriver/common/selenium_manager_spec.rb:61 # Selenium::WebDriver::SeleniumManager.binary errors if cannot find

Operating System

Fedora Rawhide

Selenium version

Ruby 3.3.6, selenium-webdriver 4.27.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions