Skip to content

Commit 62c977a

Browse files
Add note about source_window + appium 1.0
1 parent 2bb509f commit 62c977a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/appium_lib/ios/helper.rb

+4
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ def page window_number = -1
143143
# @param window_number [Integer] the int index of the target window
144144
# @return [JSON]
145145
def source_window window_number=0
146+
# appium 1.0 still returns JSON when getTree() is invoked so this
147+
# doesn't need to change to XML. If getTree() is removed then
148+
# source_window will need to parse the results of getTreeForXML()\
149+
# https://github.com/appium/appium-uiauto/blob/247eb71383fa1a087ff8f8fc96fac25025731f3f/uiauto/appium/element.js#L145
146150
execute_script "UIATarget.localTarget().frontMostApp().windows()[#{window_number}].getTree()"
147151
end
148152

0 commit comments

Comments
 (0)