Hello,
I am stuck with basic setup for three days already and I am getting a bit frustrated. I am trying to tap a button using accesibilityIdentifier.
I am running mac version of Appium 1.5.3 from .dmg file, installed locally on my development machine.
I am using XCode 7.3., application is developed by my Apple developer Team, with Code signing set to iOS Developer, automatic provisioning profile.
My code can be seen here: https://gitlab.com/zblebt/oneButton its single view application with one button and one label.
I have tried all different possibilities for accessibility settings:
button.isAccessibilityElement = true
button.accessibilityIdentifier = "my_button"
button.accessibilityLabel = "my_label_button"
button.accessibilityValue = "value_button"
I build the app using XCode Build (CMND + B), locate the .app file and copy the path to appium “Apple” settings as “App Path”. I am using real device with these settings:
image on gitlab
I can run the inspector without problems and I can see the button, with all informations. But no matter what I set for accessibilityID or Label or Value, I can not perform a “TAP” from the inspector.
Please, can you help me figure out, what part of my setup is incorrect?
This is a log:
[HTTP] --> POST /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/element {"using":"name","value":"Click me"}
[MJSONWP] Calling AppiumDriver.findElement() with args: ["name","Click me","25c1571...
[debug] [iOS] Executing iOS command 'findElement'
[HTTP] <-- POST /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/element 500 4 ms - 144
[HTTP] --> GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/source {}
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["25c15718-367f-42ef-8eae-2...
[debug] [iOS] Executing iOS command 'getPageSource'
[debug] [UIAuto] Sending command to instruments: au.mainApp().getTreeForXML()
[debug] [Instruments] [INST] 2016-09-06 08:11:33 +0000 Debug: Got new command 11 from instruments: au.mainApp().getTreeForXML()
[debug] [Instruments] [INST] 2016-09-06 08:11:33 +0000 Debug: evaluating au.mainApp().getTreeForXML()
[debug] [Instruments] [INST] 2016-09-06 08:11:33 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-09-06 08:11:33 +0000 Debug: responding with:,"valid":true,"visible":true,"hint":null,"path":"/0/0","x":0,"y":-0.5,"width":768,"height":1024},">":[{"UIAStaticText":{"@":{"name":"0","label":"0","value":"0","dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/0/0","x":379,"y":444,"width":10.5,"height":20.5},">":[]}},{"UIAButton":{"@":{"name":"Click me","label":"Click me","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/0/1","x":349,"y":494.5,"width":70,"height":34},">":[]}}]}},{"UIAWindow":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":false,"hint":null,"path":"/0/1","x":0,"y":-0.5,"width":768,"height":1024},">":[]}},{"UIAWindow":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0/2","x":0,"y":-0.5,"width":768,"height":1024},">":[{"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.5,"width":768,"height":20},">":[{"UIAElement":{"@":{"name":"iPad","label":"iPad","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.5,"width":25,"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":36,"y":-0.5,"width":13,"height":20},">":[]}},{"UIAElement":{"@":{"name":"10:11","label":"10:11","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":371,"y":-0.5,"width":30,"height":20},">":[]}},{"UIAElement":{"@":{"name":"Orientation Locked","label":"Orientation Locked","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/3","x":675,"y":-0.5,"width":12,"height":20},">":[]}},{"UIAElement":{"@":{"name":"100 % battery power, Charging","label":"100 % battery power, Charging","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/4","x":693,"y":-0.5,"width":70,"height":20},">":[]}}]}}]}}]}}}
[debug] [Instruments] [INST] 2016-09-06 08:11:33 +0000 Debug: Running system command #12: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/x6/21227y5d45gd3cl_21p5zhp40000gn/T/instruments_sock 2,{"status":0,"v...
[debug] [UIAuto] Socket data received (3201 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":{"UIAApplication":{"@":{"name":"oneButton","label":"oneButton","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0","x":0,"y":0,"width":768,"height":1024},">":[{"UIAWindow":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true
[MJSONWP] Responding to client with driver.getPageSource() result: "<?xml version=\"1.0\" enco...
[HTTP] <-- GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/source 200 1297 ms - 3703
[HTTP] --> GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/orientation {}
[MJSONWP] Calling AppiumDriver.getOrientation() with args: ["25c15718-367f-42ef-8eae-2...
[debug] [iOS] Executing iOS command 'getOrientation'
[debug] [UIAuto] Sending command to instruments: au.getScreenOrientation()
[debug] [Instruments] [INST] 2016-09-06 08:11:34 +0000 Debug: Got new command 12 from instruments: au.getScreenOrientation()
[debug] [Instruments] [INST] 2016-09-06 08:11:34 +0000 Debug: evaluating au.getScreenOrientation()
[debug] [Instruments] [INST] 2016-09-06 08:11:34 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-09-06 08:11:34 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-09-06 08:11:34 +0000 Debug: Running system command #13: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/x6/21227y5d45gd3cl_21p5zhp40000gn/T/instruments_sock 2,{"status":0,"v...
[debug] [UIAuto] Socket data received (33 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":"PORTRAIT"}
[MJSONWP] Responding to client with driver.getOrientation() result: "PORTRAIT"
[HTTP] <-- GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/orientation 200 962 ms - 82
[HTTP] --> GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/screenshot {}
[MJSONWP] Calling AppiumDriver.getScreenshot() with args: ["25c15718-367f-42ef-8eae-2...
[debug] [iOS] Executing iOS command 'getScreenshot'
[debug] [iOS] Taking screenshot: '/var/folders/x6/21227y5d45gd3cl_21p5zhp40000gn/T/appium-instruments/Run 1/screenshot4902d2b5-0eaa-4dd2-9573-39cefdb34e51.png'
[debug] [UIAuto] Sending command to instruments: au.capture('screenshot4902d2b5-0eaa-4dd2-9573-39cefdb34e51')
[debug] [Instruments] [INST] 2016-09-06 08:11:35 +0000 Debug: Got new command 13 from instruments: au.capture('screenshot4902d2b5-0eaa-4dd2-9573-39cefdb34e51')
[debug] [Instruments] [INST] 2016-09-06 08:11:35 +0000 Debug: evaluating au.capture('screenshot4902d2b5-0eaa-4dd2-9573-39cefdb34e51')
[debug] [Instruments] [INST] 2016-09-06 08:11:35 +0000 Debug: target.captureRectOnScreenWithName("{origin:{x:0.00,y:0.00}, size:{height:1024.00,width:768.00}}", UIScreen, "screenshot4902d2b5-0eaa-4dd2-9573-39cefdb34e51")
[iOSLog] [IOS_SYSLOG_ROW] Sep 6 10:11:36 zblebt syncdefaultsd[4041] <Notice>: (Note ) marked "com.me.keyvalueservice" topic as "enabled" on <APSConnection: 0x15d3ff60>
[debug] [UIAuto] Socket data received (25 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":""}
[debug] [iOS] Waiting 10000 ms for screenshot to be generated.
[debug] [Instruments] [INST] 2016-09-06 08:11:36 +0000 Screenshot captured.
[debug] [Instruments] [INST] 2016-09-06 08:11:36 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-09-06 08:11:36 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-09-06 08:11:36 +0000 Debug: Running system command #14: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/x6/21227y5d45gd3cl_21p5zhp40000gn/T/instruments_sock 2,{"status":0,"v...
[debug] [UIAuto] Sending command to instruments: au.getScreenOrientation()
[debug] [Instruments] [INST] 2016-09-06 08:11:37 +0000 Debug: Got new command 14 from instruments: au.getScreenOrientation()
[debug] [Instruments] [INST] 2016-09-06 08:11:37 +0000 Debug: evaluating au.getScreenOrientation()
[debug] [Instruments] [INST] 2016-09-06 08:11:37 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-09-06 08:11:37 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-09-06 08:11:37 +0000 Debug: Running system command #15: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/x6/21227y5d45gd3cl_21p5zhp40000gn/T/instruments_sock 2,{"status":0,"v...
[debug] [UIAuto] Socket data received (33 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":"PORTRAIT"}
[MJSONWP] Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABg...
[HTTP] <-- GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/screenshot 200 3312 ms - 97842
[HTTP] --> GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/contexts {}
[MJSONWP] Calling AppiumDriver.getContexts() with args: ["25c15718-367f-42ef-8eae-2...
[debug] [iOS] Executing iOS command 'getContexts'
[debug] [iOS] Getting list of available contexts
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: false
[debug] [RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
[debug] [RemoteDebugger] Sending request to: http://localhost:27753/json
[iOS] Attempted to get a list of webview contexts but could not connect to ios-webkit-debug-proxy. If you expect to find webviews, please ensure that the proxy is running and accessible
[debug] [iOS] No web frames found.
[MJSONWP] Responding to client with driver.getContexts() result: ["NATIVE_APP"]
[HTTP] <-- GET /wd/hub/session/25c15718-367f-42ef-8eae-23365d444963/contexts 200 12 ms - 86