When I export a Katalon Recorder script to Ruby (WebDriver + RSpec), a couple of generated methods use “${receiver}”. With this, the script does not run with rspec, I have to change it to “@driver”.
Example:
def alert_present?()
${receiver}.switch_to.alert
true
rescue Selenium::WebDriver::Error::NoAlertPresentError
false
end
must be changed to:
def element_present?(how, what)
@driver.find_element(how, what)
true
rescue Selenium::WebDriver::Error::NoSuchElementError
false
end