@@ -194,7 +194,7 @@ class Driver
194
194
attr_reader :default_wait , :app_path , :app_name , :device ,
195
195
:app_package , :app_activity , :app_wait_activity ,
196
196
:sauce_username , :sauce_access_key , :port , :debug ,
197
- :export_session
197
+ :export_session , :device_cap
198
198
199
199
# The amount to sleep in seconds before every webdriver http call.
200
200
attr_accessor :global_webdriver_http_sleep
@@ -263,6 +263,9 @@ def initialize opts={}
263
263
264
264
@port = opts . fetch :port , ENV [ 'PORT' ] || 4723
265
265
266
+ # device as used in device capabilities
267
+ @device_cap = opts . fetch :device_cap , false
268
+
266
269
# :ios, :android, :selendroid
267
270
@device = opts . fetch :device , ENV [ 'DEVICE' ] || :ios
268
271
@device = @device . intern # device must be a symbol
@@ -356,7 +359,7 @@ def ios_capabilities
356
359
browserName : 'iOS 6.0' ,
357
360
platform : 'Mac 10.8' ,
358
361
version : '6.0' ,
359
- device : 'iPhone Simulator' ,
362
+ device : @device_cap || 'iPhone Simulator' ,
360
363
name : @app_name || 'Ruby Console iOS Appium'
361
364
}
362
365
end
0 commit comments