Skip to content

Commit 789fc52

Browse files
Add ios_version method
Fix #99
1 parent 5447f4c commit 789fc52

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/appium_lib/ios/helper.rb

+5
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,9 @@ def id id
192192
raise "Invalid id `#{id}`" unless @strings_xml[id]
193193
find_element :id, id
194194
end
195+
196+
def ios_version
197+
ios_version = execute_script 'UIATarget.localTarget().systemVersion()'
198+
ios_version.split('.').map { |e| e.to_i }
199+
end
195200
end # module Appium::Ios

0 commit comments

Comments
 (0)