We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38fc42e commit 4e9f3d6Copy full SHA for 4e9f3d6
lib/appium_lib/driver.rb
@@ -261,11 +261,13 @@ def initialize opts={}
261
262
# https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile
263
@device = @caps[:platformName]
264
+ @device = @device.downcase.strip if @device
265
raise "Device must be set. Not found in options: #{opts}" unless @device
266
+ raise 'platformName must be Android or iOS' unless %w[android ios].include?(@device)
267
268
# load common methods
269
extend Appium::Common
- if @device.downcase.strip == 'android'
270
+ if @device == 'android'
271
# load Android specific methods
272
extend Appium::Android
273
else
0 commit comments