We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59980db commit 8613403Copy full SHA for 8613403
lib/appium_lib/ios/patch.rb
@@ -16,15 +16,16 @@ def type text
16
end
17
18
# returns if the element is visible
19
- # 1 = visible
20
- # 0 = not visible
21
- # null = unknown
+ # true: 1 = visible,
+ # false: 0 = not visible, 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
+ result = @driver.execute_script js
28
+ result == 1 ? true : false
29
30
31
0 commit comments