|  | 
| 8 | 8 |     let(:url) { 'https://www.selenium.dev/selenium/web/' } | 
| 9 | 9 | 
 | 
| 10 | 10 |     it 'page load strategy normal' do | 
| 11 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 11 | +      options = default_chrome_options | 
| 12 | 12 |       options.page_load_strategy = :normal | 
| 13 | 13 | 
 | 
| 14 | 14 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 17 | 17 |     end | 
| 18 | 18 | 
 | 
| 19 | 19 |     it 'page load strategy eager' do | 
| 20 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 20 | +      options = default_chrome_options | 
| 21 | 21 |       options.page_load_strategy = :eager | 
| 22 | 22 | 
 | 
| 23 | 23 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 26 | 26 |     end | 
| 27 | 27 | 
 | 
| 28 | 28 |     it 'page load strategy none' do | 
| 29 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 29 | +      options = default_chrome_options | 
| 30 | 30 |       options.page_load_strategy = :none | 
| 31 | 31 | 
 | 
| 32 | 32 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 48 | 48 |     end | 
| 49 | 49 | 
 | 
| 50 | 50 |     it 'accepts untrusted certificates' do | 
| 51 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 51 | +      options = default_chrome_options | 
| 52 | 52 |       options.accept_insecure_certs = true | 
| 53 | 53 | 
 | 
| 54 | 54 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 57 | 57 |     end | 
| 58 | 58 | 
 | 
| 59 | 59 |     it 'sets unhandled prompt behavior' do | 
| 60 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 60 | +      options = default_chrome_options | 
| 61 | 61 |       options.unhandled_prompt_behavior = :accept | 
| 62 | 62 | 
 | 
| 63 | 63 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 75 | 75 |     end | 
| 76 | 76 | 
 | 
| 77 | 77 |     it 'sets strict file interactability' do | 
| 78 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 78 | +      options = default_chrome_options | 
| 79 | 79 |       options.strict_file_interactability = true | 
| 80 | 80 | 
 | 
| 81 | 81 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 84 | 84 |     end | 
| 85 | 85 | 
 | 
| 86 | 86 |     it 'sets the proxy' do | 
| 87 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 87 | +      options = default_chrome_options | 
| 88 | 88 |       options.proxy = Selenium::WebDriver::Proxy.new(http: 'myproxy.com:8080') | 
| 89 | 89 | 
 | 
| 90 | 90 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 93 | 93 |     end | 
| 94 | 94 | 
 | 
| 95 | 95 |     it 'sets the implicit timeout' do | 
| 96 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 96 | +      options = default_chrome_options | 
| 97 | 97 |       options.timeouts = {implicit: 1} | 
| 98 | 98 | 
 | 
| 99 | 99 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 102 | 102 |     end | 
| 103 | 103 | 
 | 
| 104 | 104 |     it 'sets the page load timeout' do | 
| 105 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 105 | +      options = default_chrome_options | 
| 106 | 106 |       options.timeouts = {page_load: 400_000} | 
| 107 | 107 | 
 | 
| 108 | 108 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
| 111 | 111 |     end | 
| 112 | 112 | 
 | 
| 113 | 113 |     it 'sets the script timeout' do | 
| 114 |  | -      options = Selenium::WebDriver::Options.chrome | 
|  | 114 | +      options = default_chrome_options | 
| 115 | 115 |       options.timeouts = {script: 40_000} | 
| 116 | 116 | 
 | 
| 117 | 117 |       driver = Selenium::WebDriver.for :chrome, options: options | 
|  | 
0 commit comments