forked from watir/watir
-
Notifications
You must be signed in to change notification settings - Fork 0
Alex's Example
Titus edited this page May 30, 2017
·
1 revision
options = {
# these are options for Selenium gem
selenium: {
proxy: [Billy.proxy.host, Billy.proxy.port].join(':'),
http_client: Features::Helpers::RetryingHttpClient.new,
listener: event_listener,
}
# these are options for ChromeDriver
driver: {
args: %w[--disable-translate],
detach: false,
log: "log/chromedriver#{ENV['TEST_ENV_NUMBER']}.log"
prefs: {
download: {
prompt_for_download: false,
default_directory: '~/Downloads/'
}
},
},
# these are options for Chrome
browser: {
'chromeOptions' => {
'localState' => {
'protocol_handler' => {
'excluded_schemes' => {
'skype' => false # disable external protocol popups for `skype:' links
}
}
}
}
}
}
browser = Watir::Browser.new(:chrome, options)
would then become:
options = {
http_client: Watir::HttpClient.new {
retries: 3,
proxy: [Billy.proxy.host, Billy.proxy.port].join(':'))
},
listener: event_listener
driver_opts: {
args: %w[--disable-translate],
log: "log/chromedriver#{ENV['TEST_ENV_NUMBER']}.log"
}
browser_opts: {
detach: false,
local_state: {
protocol_handler: {
excluded_schemes: {
skype: false # disable external protocol popups for `skype:' links
}
}
},
prefs: {
download: {
prompt_for_download: false,
default_directory: '~/Downloads/'
}
}
}
}
browser = Watir::Browser.new(:chrome, options)