Capybara uses a selenium error that doesn't exist in selenium webdriver

Skip to first unread message

José Jiménez

Mar 23, 2022, 6:05:09 PMMar 23
to Capybara
In chrome_node.rb in def file_errors, capybara tries to use Selenium::WebDriver::Error::ExpectedError, which isn't defined in Selenium Webdriver version 4.1.0.

This leads to a problem trying to identify the root cause of whatever error is actually the cause of the error on attaching a file.

Is there a way to avoid this?

Perhaps by using some version of 

Object.const_defined?('Selenium::WebDriver::Error::ExpectedError') ? [::Selenium::WebDriver::Error::ExpectedError] : []

José Jiménez

Mar 23, 2022, 6:10:03 PMMar 23
to Capybara
I might be wrong on the exact cause.  It looks like expectederror might be defined, but not at that definition?
Reply all
Reply to author
0 new messages