UI Automation: element could not be tapped on plainly visible, non-hidden buttons

Hey There,
I know there are quite a few posts old and new on this topic.
Background:
Appium 1.4.13
Xcode 7.0, iOS 9.0

I navigate to a button. ARC shows the button labeled by id with the text “Submit”.
find_element(:id, “Submit”).click (using ARC) > elementID 0 could not be tapped.

From the posts I’ve read, I’ve surmised this may simply be a bug in UI Automation, and that I need to simply workaround this.

Are there any other comprehensive thoughts on this topic? I’d rather use IDs if I can. Using other strategies are becoming more brittle.

Much thanks in advance!
Eric

PS. Here’s another example: I’m trying to click the top left hamburger icon (the main menu). It’s clearly onscreen but is seen by the inspector as NOT visible. In addition, find_element(:id, “Main Menu”) yields a y coordinate of -74 (that’s what Appium seemingly gets from UI Automation)

Did you ever fix this issue? I have the exact same problem and completely stumped. Even the XPATH cannot be tapped.

What if you try using a TouchAction tap on the exact screen coordinates of the element?

@jonahss So with Xcode 7.1, appium 1.4.13, and iOS 9.1, the find element by id in question can now be tapped so I’m all good. I’ll keep your touch action in mind. Thanks though
@dave_gerard send over your inspector and appium logs with your environment info and let’s see if we can get you a solution

Thanks
Eric

1 Like

Inspector:





































































































































































Appium logs:

e[36minfoe[39m: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
e[36minfoe[39m: Appium REST http interface listener started on 0.0.0.0:4723
e[36minfoe[39m: [debug] Non-default server args: {“noReset”:true}
e[36minfoe[39m: Console LogLevel: debug
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“app”:“/Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app”,“platformName”:“iOS”,“platformVersion”:“9.1”,“deviceName”:“iPhone 6”,“udid”:“”,“locationServicesEnabled”:“false”,“bundleId”:“com.test.testpk”,“screenshotWaitTimeout”:“10”,“browserName”:“”}}e[39m
e[36minfoe[39m: Client User-Agent string: undefined
e[33mwarne[39m: Converting cap locationServicesEnabled from string to boolean. This might cause unexpected behavior.
e[36minfoe[39m: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : screenshotWaitTimeout
e[36minfoe[39m: [debug] Using local app from desired caps: /Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app
e[36minfoe[39m: [debug] Creating new appium session b5ccf590-a128-45ad-a015-20f20f30eb6e
e[36minfoe[39m: [debug] Removing any remaining instruments sockets
e[36minfoe[39m: [debug] Cleaned up instruments socket /tmp/instruments_sock
e[36minfoe[39m: [debug] Setting Xcode version
e[36minfoe[39m: [debug] Xcode version set to 7.1.1
e[36minfoe[39m: [debug] Setting iOS SDK Version
e[36minfoe[39m: [debug] iOS SDK Version set to 9.1
e[36minfoe[39m: [debug] Checking whether instruments supports our device string
e[36minfoe[39m: [debug] Getting list of devices instruments supports
e[36minfoe[39m: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
e[36minfoe[39m: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“7.1.1”,“iOSSDKVersion”:“9.1”,“deviceName”:“iPhone 6”,“platformVersion”:“9.1”}
e[36minfoe[39m: [debug] fixDevice is on
e[36minfoe[39m: [debug] Fixing device. Changed from: “iPhone 6 (9.1)” to: “iPhone 6 (9.1) [”
e[36minfoe[39m: [debug] Final device string is: ‘iPhone 6 (9.1) [’
e[36minfoe[39m: [debug] iOS sim UDID is
e[36minfoe[39m: [debug] Auto-detecting iOS udid…
e[36minfoe[39m: [debug] Not auto-detecting udid, running on sim
e[36minfoe[39m: [debug] Could not parse plist file (as binary) at /Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app/en.lproj/Localizable.strings
e[36minfoe[39m: Will try to parse the plist file as XML
e[36minfoe[39m: [debug] Could not parse plist file (as XML) at /Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app/en.lproj/Localizable.strings
e[33mwarne[39m: Could not parse app Localizable.strings assuming it doesn’t exist
e[36minfoe[39m: [debug] Creating instruments
e[36minfoe[39m: [debug] Preparing uiauto bootstrap
e[36minfoe[39m: [debug] Dynamic bootstrap dir: /Users/dgallan1/Library/Application Support/appium/bootstrap
e[36minfoe[39m: [debug] Dynamic env: {“nodePath”:“/usr/local/Cellar/node/0.12.2_1/bin/node”,“commandProxyClientPath”:“/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js”,“instrumentsSock”:“/tmp/instruments_sock”,“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“oneByOne”}
e[36minfoe[39m: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

e[36minfoe[39m: [debug] Dynamic bootstrap path: /Users/dgallan1/Library/Application Support/appium/bootstrap/bootstrap-4f2c63ae7d974ada.js
e[36minfoe[39m: [debug] Reusing dynamic bootstrap: /Users/dgallan1/Library/Application Support/appium/bootstrap/bootstrap-4f2c63ae7d974ada.js
e[36minfoe[39m: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“7.1.1”,“iOSSDKVersion”:“9.1”,“deviceName”:“iPhone 6”,“platformVersion”:“9.1”}
e[36minfoe[39m: [debug] fixDevice is on
e[36minfoe[39m: [debug] Fixing device. Changed from: “iPhone 6 (9.1)” to: “iPhone 6 (9.1) [”
e[36minfoe[39m: [debug] Final device string is: ‘iPhone 6 (9.1) [’
e[36minfoe[39m: [debug] We’re on iOS7.1+ so forcing defaultDevice on
e[36minfoe[39m: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“7.1.1”,“iOSSDKVersion”:“9.1”,“deviceName”:“iPhone 6”,“platformVersion”:“9.1”}
e[36minfoe[39m: [debug] fixDevice is on
e[36minfoe[39m: [debug] Fixing device. Changed from: “iPhone 6 (9.1)” to: “iPhone 6 (9.1) [”
e[36minfoe[39m: [debug] Final device string is: ‘iPhone 6 (9.1) [’
e[36minfoe[39m: [debug] Could not parse plist file (as binary) at /Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app/Info.plist
e[36minfoe[39m: Will try to parse the plist file as XML
e[36minfoe[39m: [debug] Parsed app Info.plist (as XML)
e[36minfoe[39m: [debug] Wrote new app Info.plist with device type
e[36minfoe[39m: [debug] Checking whether we need to set app preferences
e[36minfoe[39m: [debug] Not setting iOS and app preferences since we’re on a real device
e[36minfoe[39m: [debug] Reset not set, not ending sim or cleaning up app state
e[36minfoe[39m: [debug] Not setting locale
e[36minfoe[39m: [debug] No iOS / app preferences to set
e[36minfoe[39m: [debug] Starting iOS 8.* simulator log capture
e[36minfoe[39m: [debug] Not pre-launching simulator
e[36minfoe[39m: [debug] Starting command proxy.
e[36minfoe[39m: [debug] Instruments socket server started at /tmp/instruments_sock
e[36minfoe[39m: [debug] Starting instruments
e[36minfoe[39m: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
e[36minfoe[39m: Launching instruments
e[36minfoe[39m: [debug] Attempting to run app on iPhone 6 (9.1) [
e[36minfoe[39m: On xcode 7.0, instruments-without-delay does not work, skippinginstruments-without-delay
e[36minfoe[39m: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w “iPhone 6 (9.1) [” /Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app -e UIASCRIPT “/Users/dgallan1/Library/Application Support/appium/bootstrap/bootstrap-4f2c63ae7d974ada.js” -e UIARESULTSPATH /tmp/appium-instruments
e[36minfoe[39m: [debug] And launch timeouts (in ms): {“global”:90000}
e[36minfoe[39m: Instruments is ready to receive commands
e[36minfoe[39m: [debug] Instruments launched. Starting poll loop for new commands.
e[36minfoe[39m: [debug] Setting bootstrap config keys/values
e[36minfoe[39m: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
e[36minfoe[39m: [debug] Socket data received (2 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;

e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:09 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:09 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:09 +0000 Debug: Running system command #1: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:true}…e[39m
e[36minfoe[39m: [debug] Socket data received (27 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:true}
e[36minfoe[39m: [debug] Setting initial orientation to PORTRAIT
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.setScreenOrientation(‘PORTRAIT’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.setScreenOrientation(‘PORTRAIT’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:10 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:10 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:10 +0000 Debug: target.setDeviceOrientation(“1”)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:11 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:11 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:11 +0000 Debug: Running system command #2: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:“PORTRAIT”}…e[39m
e[36minfoe[39m: [debug] Socket data received (33 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:“PORTRAIT”}
e[36minfoe[39m: [debug] Waiting for app source to contain elements
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.mainApp().getTreeForXML()”
e[36minfoe[39m: [debug] Sending command to instruments: au.mainApp().getTreeForXML()
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:12 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:12 +0000 Debug: evaluating au.mainApp().getTreeForXML()e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:12 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:12 +0000 Debug: responding with::true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:[{“UIANavigationBar”:{“@”:{“name”:“rfd.RFDTabBar”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0”,“x”:0,“y”:20,“width”:375,“height”:44},“>”:[{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/0/0”,“x”:0,“y”:0,“width”:375,“height”:64},“>”:[{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/0/0/0”,“x”:0,“y”:64,“width”:375,“height”:0.5},“>”:}}]}},{“UIAElement”:{“@”:{“name”:“SearchBar”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0/1”,“x”:52,“y”:20,“width”:271,“height”:44},“>”:[{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0/1/0”,“x”:52,“y”:0,“width”:271,“height”:64},“>”:}},{“UIASearchBar”:{“@”:{“name”:“Search”,“label”:“Search”,“value”:“Search”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0/1/1”,“x”:52,“y”:28,“width”:271,“height”:28},“>”:[{“UIASearchBar”:{“@”:{“name”:“Search”,“label”:“Search”,“value”:“Search”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0/1/1/0”,“x”:52,“y”:28,“width”:271,“height”:28},“>”:}}]}}]}},{“UIAButton”:{“@”:{“name”:“Back”,“label”:“Back”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/0/2”,“x”:8,“y”:31.5,“width”:21,“height”:21},“>”:}},{“UIAButton”:{“@”:{“name”:“DrawerMenuButton”,“label”:“HamburgerIcon”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0/3”,“x”:16,“y”:32,“width”:20,“height”:20},“>”:}},{“UIAButton”:{“@”:{“name”:“FavouritesButton”,“label”:“FavouriteIcon”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/0/4”,“x”:334,“y”:31,“width”:25,“height”:22},“>”:}}]}},{“UIAButton”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/1”,“x”:0,“y”:64,“width”:75,“height”:50},“>”:}},{“UIAImage”:{“@”:{“name”:“HomeTabIconHighlighted.png”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/2”,“x”:23.5,“y”:75,“width”:28,“height”:28},“>”:}},{“UIAButton”:{“@”:{“name”:“NewsTab”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/3”,“x”:75,“y”:64,“width”:75,“height”:50},“>”:}},{“UIAImage”:{“@”:{“name”:“NewsTabIcon.png”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/4”,“x”:98.5,“y”:75,“width”:28,“height”:28},“>”:}},{“UIAButton”:{“@”:{“name”:“FlyersTab”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/5”,“x”:150,“y”:64,“width”:75,“height”:50},“>”:}},{“UIAImage”:{“@”:{“name”:“FlyersTabIcon.png”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/6”,“x”:173.5,“y”:75,“width”:28,“height”:28},“>”:}},{“UIAButton”:{“@”:{“name”:“DealsTab”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/7”,“x”:225,“y”:64,“width”:75,“height”:50},“>”:}},{“UIAImage”:{“@”:{“name”:“DealsTabIcon.png”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/8”,“x”:248.5,“y”:75,“width”:28,“height”:28},“>”:}},{“UIAButton”:{“@”:{“name”:“ForumsTab”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/9”,“x”:300,“y”:64,“width”:75,“height”:50},“>”:}},{“UIAImage”:{“@”:{“name”:“ForumsTabIcon.png”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/10”,“x”:323.5,“y”:75,“width”:28,“height”:28},“>”:}},{“UIAButton”:{“@”:{“name”:“FilterIcon”,“label”:“FilterIcon”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/11”,“x”:0,“y”:114,“width”:47,“height”:45},“>”:}},{“UIAScrollView”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/12”,“x”:46,“y”:114,“width”:329,“height”:45},“>”:}},{“UIATableView”:{“@”:{“name”:null,“label”:null,“value”:“rows 1 to 2 of 5”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/0/13”,“x”:0,“y”:114,“width”:375,“height”:553},“>”:[{“UIATableCell”:{“@”:{“name”:“Latest Halloween Deals”,“label”:null,“value”:0,“dom”:null,“enabled”:false,“valid”:false,“visible”:false,“hint”:null,“path”:“/0/0/13/0”,“x”:0,“y”:114,“width”:375,“height”:289},“>”:}},{“UIATableCell”:{“@”:{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:false,“valid”:false,“visible”:false,“hint”:null,“path”:“/0/0/13/1”,“x”:0,“y”:0,“width”:0,“height”:0},“>”:}},{“UIATableCell”:{“@”:{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:false,“valid”:false,“visible”:false,“hint”:null,“path”:“/0/0/13/2”,“x”:0,“y”:0,“width”:0,“height”:0},“>”:}},{“UIATableCell”:{“@”:{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:false,“valid”:false,“visible”:false,“hint”:null,“path”:“/0/0/13/3”,“x”:0,“y”:0,“width”:0,“height”:0},“>”:}},{“UIATableCell”:{“@”:{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:false,“valid”:false,“visible”:false,“hint”:null,“path”:“/0/0/13/4”,“x”:0,“y”:0,“width”:0,“height”:0},“>”:}}]}},{“UIAToolbar”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/14”,“x”:0,“y”:667,“width”:375,“height”:44},“>”:[{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/14/0”,“x”:0,“y”:666.5,“width”:375,“height”:0.5},“>”:}},{“UIAImage”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/0/14/1”,“x”:0,“y”:667,“width”:375,“height”:44},“>”:}}]}}]}},{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:“/0/1”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:}},{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/2”,“x”:0,“y”:0,“width”:375,“height”:667},“>”:[{“UIAStatusBar”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0/2/0”,“x”:0,“y”:0,“width”:375,“height”:20},“>”:[{“UIAElement”:{“@”:{“name”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:“/0/2/0/0”,“x”:6,“y”:0,“width”:39,“height”:20},“>”:}},{“UIAElement”:{“@”:{“name”:“3 of 3 Wi-Fi bars”,“label”:“3 of 3 Wi-Fi bars”,“value”:“SSID”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:“/0/2/0/1”,“x”:50,“y”:0,“width”:13,“height”:20},“>”:}},{“UIAElement”:{“@”:{“name”:“4:20 PM”,“label”:“4:20 PM”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:“/0/2/0/2”,“x”:164,“y”:0,“width”:50,“height”:20},“>”:}},{“UIAElement”:{“@”:{“name”:“-100% battery power”,“label”:“-100% battery power”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:“Se[39m
e[36minfoe[39m: [debug] e[32m[INST] wipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top”,“path”:“/0/2/0/3”,“x”:345,“y”:0,“width”:25,“height”:20},“>”:}}]}}]}}]}}}e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:12 +0000 Debug: Running system command #3: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“UIAApplication”:{“@”:{“name”:“rfd”,“label”:“rfd”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“vis…e[39m
e[36minfoe[39m: [debug] Socket data received (8192 bytes)
e[36minfoe[39m: [debug] Socket data received (479 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{”@“:{“name”:“rfd”,“label”:“rfd”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:”/0",“x”:0,“y”:0,“width”:375,“height”:667},“>”:[{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”
e[36minfoe[39m: [debug] Device launched! Ready for commands
e[36minfoe[39m: [debug] Setting command timeout to the default of 60 secs
e[36minfoe[39m: [debug] Appium session started with sessionId b5ccf590-a128-45ad-a015-20f20f30eb6e
e[36minfoe[39m: e[37m<-- POST /wd/hub/session e[39me[36m303e[39me[90m 6939.700 ms - 74e[39m e[90me[39m
e[36minfoe[39m: e[37m–>e[39m e[37mGETe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6ee[39m e[90m{}e[39m
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“warnings”:{},“desired”:{“app”:“/Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app”,“platformName”:“iOS”,“platformVersion”:“9.1”,“deviceName”:“iPhone 6”,“udid”:“”,“locationServicesEnabled”:false,“bundleId”:“com.test.test”,“screenshotWaitTimeout”:“10”,“browserName”:“”},“app”:“/Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app”,“platformName”:“iOS”,“platformVersion”:“9.1”,“deviceName”:“iPhone 6”,“udid”:“”,“locationServicesEnabled”:false,“bundleId”:“com.test.testpk”,“screenshotWaitTimeout”:“10”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- GET /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e e[39me[32m200e[39me[90m 3.294 ms - 788e[39m e[90m{“status”:0,“value”:{“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“warnings”:{},“desired”:{“app”:“/Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app”,“platformName”:“iOS”,“platformVersion”:“9.1”,“deviceName”:“iPhone 6”,“udid”:“”,“locationServicesEnabled”:false,“bundleId”:“com.test.testpk”,“screenshotWaitTimeout”:“10”,“browserName”:“”},“app”:“/Users/dgallan1/RFD-Mobile/rfd-qa/apps/rfd.app”,“platformName”:“iOS”,“platformVersion”:“9.1”,“deviceName”:“iPhone 6”,“udid”:“”,“locationServicesEnabled”:false,“bundleId”:“com.test.testpk”,“screenshotWaitTimeout”:“10”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/elemente[39m e[90m{“using”:“accessibility id”,“value”:“DealsTab”}e[39m
e[36minfoe[39m: [debug] Waiting up to 0ms for condition
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.getElementByAccessibilityId(‘DealsTab’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.getElementByAccessibilityId(‘DealsTab’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:13 +0000 Debug: Got new command 3 from instruments: au.getElementByAccessibilityId(‘DealsTab’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:13 +0000 Debug: evaluating au.getElementByAccessibilityId(‘DealsTab’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:13 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:13 +0000 Debug: Lookup returned [object UIAButton] with the name “DealsTab” (id: 0).e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:13 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:13 +0000 Debug: Running system command #4: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“ELEMENT”:“0”}}…e[39m
e[36minfoe[39m: [debug] Socket data received (38 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:{“ELEMENT”:“0”}}
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“0”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/element e[39me[32m200e[39me[90m 1044.801 ms - 87e[39m e[90m{“status”:0,“value”:{“ELEMENT”:“0”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/elemente[39m e[90m{“using”:“accessibility id”,“value”:“DealsTab”}e[39m
e[36minfoe[39m: [debug] Waiting up to 0ms for condition
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.getElementByAccessibilityId(‘DealsTab’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.getElementByAccessibilityId(‘DealsTab’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:14 +0000 Debug: Got new command 4 from instruments: au.getElementByAccessibilityId(‘DealsTab’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:14 +0000 Debug: evaluating au.getElementByAccessibilityId(‘DealsTab’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:14 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:14 +0000 Debug: Lookup returned [object UIAButton] with the name “DealsTab” (id: 1).e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:14 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:14 +0000 Debug: Running system command #5: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“ELEMENT”:“1”}}…e[39m
e[36minfoe[39m: [debug] Socket data received (38 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:{“ELEMENT”:“1”}}
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/element e[39me[32m200e[39me[90m 958.374 ms - 87e[39m e[90m{“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/touch/clicke[39m e[90m{“element”:“1”}e[39m
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.tapById(‘1’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.tapById(‘1’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:15 +0000 Debug: Got new command 5 from instruments: au.tapById(‘1’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:15 +0000 Debug: evaluating au.tapById(‘1’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:15 +0000 Debug: UIAButton.tap()e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:15 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:15 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:15 +0000 Debug: Running system command #6: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:“”}…e[39m
e[36minfoe[39m: [debug] Socket data received (25 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:“”}
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:“”,“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/touch/click e[39me[32m200e[39me[90m 1252.914 ms - 74e[39m e[90m{“status”:0,“value”:“”,“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/elemente[39m e[90m{“using”:“id”,“value”:“First Deal”}e[39m
e[36minfoe[39m: [debug] Waiting up to 0ms for condition
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.getElementByAccessibilityId(‘First Deal’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.getElementByAccessibilityId(‘First Deal’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:16 +0000 Debug: Got new command 6 from instruments: au.getElementByAccessibilityId(‘First Deal’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:16 +0000 Debug: evaluating au.getElementByAccessibilityId(‘First Deal’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:16 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:16 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:16 +0000 Debug: Running system command #7: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“ELEMENT”:“2”}}…e[39m
e[36minfoe[39m: [debug] Socket data received (38 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:{“ELEMENT”:“2”}}
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/element e[39me[32m200e[39me[90m 1425.359 ms - 87e[39m e[90m{“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/elemente[39m e[90m{“using”:“id”,“value”:“First Deal”}e[39m
e[36minfoe[39m: [debug] Waiting up to 0ms for condition
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.getElementByAccessibilityId(‘First Deal’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.getElementByAccessibilityId(‘First Deal’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:17 +0000 Debug: Got new command 7 from instruments: au.getElementByAccessibilityId(‘First Deal’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:17 +0000 Debug: evaluating au.getElementByAccessibilityId(‘First Deal’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:18 +0000 Debug: evaluation finishede[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:18 +0000 Debug: Lookup returned [object UIAStaticText] with the name “First Deal” (id: 3).e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:18 +0000 Debug: responding with:e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:18 +0000 Debug: Running system command #8: /usr/local/Cellar/node/0.12.2_1/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:{“ELEMENT”:“3”}}…e[39m
e[36minfoe[39m: [debug] Socket data received (38 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:0,“value”:{“ELEMENT”:“3”}}
e[36minfoe[39m: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“3”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/element e[39me[32m200e[39me[90m 1487.016 ms - 87e[39m e[90m{“status”:0,“value”:{“ELEMENT”:“3”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}e[39m
e[36minfoe[39m: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/element/3/clicke[39m e[90m{}e[39m
e[36minfoe[39m: [debug] Pushing command to appium work queue: “au.tapById(‘3’)”
e[36minfoe[39m: [debug] Sending command to instruments: au.tapById(‘3’)
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: Got new command 8 from instruments: au.tapById(‘3’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: evaluating au.tapById(‘3’)e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText.tap()e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText.scrollToVisible()e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText - scrollToVisible cannot be used because this element has no scrollable ancestor.e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText - scrollToVisible cannot be used because this element has no scrollable ancestor.e[39m
e[36minfoe[39m: [debug] e[32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText could not be tapped because the element is not visiblee[39m
e[36minfoe[39m: [debug] Socket data received (57 bytes)
e[36minfoe[39m: [debug] Socket data being routed.
e[36minfoe[39m: [debug] Got result from instruments: {“status”:13,“value”:“elementId 3 could not be tapped”}
e[36minfoe[39m: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“elementId 3 could not be tapped”},“sessionId”:“b5ccf590-a128-45ad-a015-20f20f30eb6e”}
e[36minfoe[39m: e[37m<-- POST /wd/hub/session/b5ccf590-a128-45ad-a015-20f20f30eb6e/element/3/click e[39me[31m500e[39me[90m 1088.258 ms - 200e[39m e[90me[39m

Hi Dave,
Thanks for the reply!
So your Appium Inspector showed up blank fyi. :smile:
So I took a look at your Appium log and I see this:

[quote="dave_gerard, post:5, topic:6312"]
[36minfo[39m: [debug] [32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText.scrollToVisible()[39m[36minfo[39m: [debug] [32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText - scrollToVisible cannot be used because this element has no scrollable ancestor.
[debug] [32m[INST] 2015-12-01 21:20:19 +0000 Debug: UIAStaticText could not be tapped because the element is not visible[39m
[/quote]
  • Hey there, it looks like the element that you are trying to scroll to is not visible for some reason.

  • Additionally, I have not had scrollToVisible work in some time. I know there’s been some chatter on this elsewhere - I’d look there if you want to still use scrollToVisible.

  • I would look into the touchAction libraries for your scrolling needs. After which, you should be able to tap on the element correctly. If you’d like, I can attach some generic Swipe methods I wrote (well really, borrowed from discuss.appium.io)

Hope this is helpful.
Thanks!
Eric

1 Like

[You can acutally use X, Y coordinates to tap them] (Appium not seeing custom UIImageView / UIImage in XML)

Just for those who stuck with this issue i faced a solution which works in ruby (don’t know other clients)

you can try to click the element from touch actions:

action = Appium::TouchAction.new
action.press(element: find_element(accessibility_id: text)).release.perform

(Only tested for ios)