Skip to content

Commit a61b297

Browse files
Add .visible for iOS
1 parent 6f6dda5 commit a61b297

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/appium_lib/ios/patch.rb

+12
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ def type text
1414
JS
1515
@driver.execute_script js
1616
end
17+
18+
# returns if the element is visible
19+
# 1 = visible
20+
# 0 = not visible
21+
# null = unknown
22+
# http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Reference/UIAElementClassReference/UIAElement/UIAElement.html#//apple_ref/doc/uid/TP40009903
23+
def visible
24+
js = <<-JS
25+
au.getElement('#{self.ref}').isVisible();
26+
JS
27+
@driver.execute_script js
28+
end
1729
end
1830
end
1931
end

0 commit comments

Comments
 (0)