@@ -139,9 +139,9 @@ def create_driver!(**opts, &block)
139
139
140
140
method = "create_#{driver}_driver".to_sym
141
141
instance = if private_methods.include?(method)
142
-
send method, opts
142
+
send method, **opts
143
143
else
144
-
WebDriver::Driver.for(driver, opts)
144
+
WebDriver::Driver.for(driver, **opts)
145
145
end
146
146
@create_driver_error_count -= 1 unless @create_driver_error_count.zero?
147
147
if block
@@ -185,48 +185,48 @@ def check_for_previous_error
185
185
raise DriverInstantiationError, msg, @create_driver_error.backtrace
186
186
end
187
187
188
-
def create_remote_driver(opt = {})
189
-
options = opt.delete(:capabilities)
190
-
opt[:capabilities] = [WebDriver::Remote::Capabilities.send(browser)]
191
-
opt[:capabilities] << options if options
192
-
opt[:url] = ENV.fetch('WD_REMOTE_URL', remote_server.webdriver_url)
193
-
opt[:http_client] ||= WebDriver::Remote::Http::Default.new
188
+
def create_remote_driver(**opts)
189
+
options = opts.delete(:capabilities)
190
+
opts[:capabilities] = [WebDriver::Remote::Capabilities.send(browser)]
191
+
opts[:capabilities] << options if options
192
+
opts[:url] = ENV.fetch('WD_REMOTE_URL', remote_server.webdriver_url)
193
+
opts[:http_client] ||= WebDriver::Remote::Http::Default.new
194
194
195
-
WebDriver::Driver.for(:remote, opt)
195
+
WebDriver::Driver.for(:remote, **opts)
196
196
end
197
197
198
-
def create_firefox_driver(opt = {})
198
+
def create_firefox_driver(**opts)
199
199
WebDriver::Firefox.path = ENV.fetch('FIREFOX_BINARY', nil) if ENV.key?('FIREFOX_BINARY')
200
-
WebDriver::Driver.for :firefox, opt
200
+
WebDriver::Driver.for :firefox, **opts
201
201
end
202
202
203
-
def create_firefox_nightly_driver(opt = {})
203
+
def create_firefox_nightly_driver(**opts)
204
204
ENV['FIREFOX_BINARY'] = ENV.fetch('FIREFOX_NIGHTLY_BINARY', nil)
205
-
opt[:capabilities] = [
205
+
opts[:capabilities] = [
206
206
WebDriver::Firefox::Options.new(debugger_address: true),
207
207
WebDriver::Remote::Capabilities.firefox(web_socket_url: true)
208
208
]
209
-
create_firefox_driver(opt)
209
+
create_firefox_driver(**opts)
210
210
end
211
211
212
-
def create_ie_driver(opt = {})
213
-
opt[:capabilities] = WebDriver::IE::Options.new(require_window_focus: true)
214
-
WebDriver::Driver.for :ie, opt
212
+
def create_ie_driver(**opts)
213
+
opts[:capabilities] = WebDriver::IE::Options.new(require_window_focus: true)
214
+
WebDriver::Driver.for :ie, **opts
215
215
end
216
216
217
-
def create_chrome_driver(opt = {})
217
+
def create_chrome_driver(**opts)
218
218
WebDriver::Chrome.path = ENV.fetch('CHROME_BINARY', nil) if ENV.key?('CHROME_BINARY')
219
-
WebDriver::Driver.for :chrome, opt
219
+
WebDriver::Driver.for :chrome, **opts
220
220
end
221
221
222
-
def create_safari_preview_driver(opt = {})
222
+
def create_safari_preview_driver(**opts)
223
223
WebDriver::Safari.technology_preview!
224
-
WebDriver::Driver.for :safari, opt
224
+
WebDriver::Driver.for :safari, **opts
225
225
end
226
226
227
-
def create_edge_driver(opt = {})
227
+
def create_edge_driver(**opts)
228
228
WebDriver::Edge.path = ENV.fetch('EDGE_BINARY', nil) if ENV.key?('EDGE_BINARY')
229
-
WebDriver::Driver.for :edge, opt
229
+
WebDriver::Driver.for :edge, **opts
230
230
end
231
231
232
232
def extract_browser_from_bazel_target_name
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4