require 'minitest/autorun' require 'minitest/capybara' require 'minitest/hooks' require 'minitest-metadata' require 'selenium/webdriver' Dir['./test/support/*.rb'].each { |f| load f } Capybara.register_driver :chrome do |app| Capybara::Selenium::Driver.new(app, browser: :chrome, args: ["--window-size=1280,1024"] ) end Capybara.register_driver :firefox do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(marionette: :false) Capybara::Selenium::Driver.new(app, browser: :firefox, desired_capabilities: capabilities ) end Capybara.register_driver :phantomjs do |app| Capybara::Selenium::Driver.new(app, browser: :phantomjs) end Capybara.register_driver :android do |app| chrome_options = { "chromeOptions" => { "androidPackage" => "com.android.chrome" } } capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chrome_options) Capybara::Selenium::Driver.new(app, browser: :remote, desired_capabilities: capabilities, url: "http://localhost:4444" ) end Capybara.default_driver = :chrome Capybara.app_host = "https://google.com"