Skip to content

Commit 9e3a3e9

Browse files
Move default wait to init param
1 parent ae9acb1 commit 9e3a3e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/appium_lib/driver.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def initialize options={}
7474
options.each_pair { |k,v| opts[k.to_s.downcase.strip.intern] = v }
7575

7676
opts = {} if opts.nil?
77+
78+
@default_wait = opts.fetch :wait, 30
79+
7780
# Path to the .apk, .app or .app.zip.
7881
# The path can be local or remote for Sauce.
7982
@app_path = opts.fetch :app_path, ENV['APP_PATH']
@@ -249,14 +252,11 @@ def driver_quit
249252

250253
# Creates a new global driver and quits the old one if it exists.
251254
#
252-
# @param wait [Integer] seconds to wait before timing out a command. defaults to 30 seconds
253255
# @return [Selenium::WebDriver] the new global driver
254-
def start_driver wait=30
256+
def start_driver
255257
@client = @client || Selenium::WebDriver::Remote::Http::Default.new
256258
@client.timeout = 999999
257259

258-
@default_wait = wait
259-
260260
begin
261261
@driver = Selenium::WebDriver.for :remote, http_client: @client, desired_capabilities: capabilities, url: server_url
262262
# Load touch methods. Required for Selendroid.

0 commit comments

Comments
 (0)