_cucumber/lib/options/run_tests_options.rb
#
# Checks that the user has supplied us with a valid driver name
#
Checks that the user has supplied us with a valid driver name
Checks that the user has supplied us with a valid driver name
def check_supported_driver(driver)
    return if @supported_drivers.include?(driver)
    if driver.include?('bs_')
      browserstack_browsers = "#{@cucumber_dir}/driver/browserstack/browsers.json"
      json = File.read(browserstack_browsers)
      config = JSON.parse(json)
      Kernel.abort("Invalid remote browser specified! Browser '#{driver}' \n See available browserstack options here: '#{browserstack_browsers}' \n Set desired stack using --driver=bs_ie_11") unless config.include?(driver)
    else
      driver_config_file = "#{@cucumber_dir}/driver/device_config/chromium_devices.json"
      json = File.read(driver_config_file)
      config = JSON.parse(json)
      Kernel.abort("Invalid device specified! Device '#{driver}' was not found \n see available test devices here: '#{driver_config_file}'") unless config.include?(driver)
    end
  end
def check_supported_driver ( driver ) return if @supported_drivers . include? ( driver ) if driver . include? ( 'bs_' ) browserstack_browsers = "#{@cucumber_dir}/driver/browserstack/browsers.json" json = File . read ( browserstack_browsers ) config = JSON . parse ( json ) Kernel . abort ( "Invalid remote browser specified! Browser '#{driver}' \n See available browserstack options here: '#{browserstack_browsers}' \n Set desired stack using --driver=bs_ie_11" ) unless config . include? ( driver ) else driver_config_file = "#{@cucumber_dir}/driver/device_config/chromium_devices.json" json = File . read ( driver_config_file ) config = JSON . parse ( json ) Kernel . abort ( "Invalid device specified! Device '#{driver}' was not found \n see available test devices here: '#{driver_config_file}'" ) unless config . include? ( driver ) end end
Checks that the user has supplied us with a valid driver name
Checks that the user has supplied us with a valid driver name
# Check that the device being used for emulation is supported by chrome
driver
<not_specific>