0
I need to perform my tests, but my work network uses a proxy. What better way to set this up within my env.Rb
Below follows my file configuration code "env.Rb"
require "selenium-webdriver"
require "capybara"
require 'capybara/cucumber'
require "rspec"
require 'site_prism'
Capybara.register_driver :selenium_chrome do |app|
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: { accept_insecure_certs: false }
)
end
Capybara.configure do |config|
config.run_server = false
config.default_driver = :selenium_chrome
config.app_host = "http://www.google.com"
end
Capybara.current_session.driver.browser.agent.set_proxy("172.16.0.1", 80)
Capybara.default_max_wait_time = 20
Capybara.page.driver.browser.manage.window.maximize
Capybara.javascript_driver = :webkit