App setup for Appium automation

Hi there,

I’m new to appium and iOS automation. I am trying to an automation test suite using Ruby, Rspec, and Appium.
I have successfully setup Appium and built a working test framework. I can get Appium to launch my company’s iOS on real devices.

I’m running into an issue of the Appium not finding or identifying key elements in the app. Elements like the email field for login and tiles on the app homepage.
The iOS devs and I are not very experienced in automation for apps, is there something that needs to be done within the app code to be more automation friendly?

Thanks in advance,
Stephanie

Please post log

appium version, ios version your using and xcode

Appium 1.3.1
Xcode 6.1
iPhone 8

Log Ouput from one run
info: Welcome to Appium v1.3.1 (REV 1160ce02bb89c354cb99317985123acf39f0e7d3)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {“desiredCapabilities”:{“platformName”:“iOS”,“deviceName”:“biggiesmalls”,“udid”:“5b061a4303fcexxxxxxx68392e525e8156723f”,“bundleId”:“com.paperless.paperlesspost”}}
info: Client User-Agent string: Ruby
info: [debug] App is an iOS bundle, will attempt to run as pre-existing
info: [debug] Creating new appium session 8a38d072-ebe0-4dac-afc0-b88b18afed60
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.1
info: [debug] Not checking whether simulator is available since we’re on a real device
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Localizable.strings is not currently supported when using real devices.
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/skart/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:"/usr/local/Cellar/node/0.10.32/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}
…o: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
info: [debug] Dynamic bootstrap path: /Users/skart/Library/Application Support/appium/bootstrap/bootstrap-0ca2c821373eb439.js
info: [debug] Reusing dynamic bootstrap: /Users/skart/Library/Application Support/appium/bootstrap/bootstrap-0ca2c821373eb439.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.1”,“iOSSDKVersion”:“8.1”,“deviceName”:“biggiesmalls”,“platformVersion”:null}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘biggiesmalls (8.1 Simulator)’
info: [debug] Not setting device type since we’re on a real device
info: [debug] Checking whether we need to set app preferences
info: [debug] Not setting iOS and app preferences since we’re on a real device
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] On a real device; cannot clean device state
info: [debug] Not setting locale because we’re using a real device
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS device log capture via deviceconsole
info: [debug] Not pre-launching simulator
info: [debug] Creating iDevice object with udid 5b061a4303xxxxxxx92e525e8156723f
info: [debug] Couldn’t find ideviceinstaller, trying built-in at /usr/local/lib/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
info: [debug] Checking app install status using: /usr/local/lib/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id 5b061a4303fce12c14500268392e525e8156723f --bundle com.paperless.paperlesspost
info: [debug] App is installed.
info: [debug] fullReset not requested. No need to install.
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 5b061a4303fce12xxxxxxxxe8156723f
info: [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 5b061a4303fce12c14500268392e525e8156723f com.paperless.paperlesspost -e UIASCRIPT “/Users/skart/Library/Application Support/appium/bootstrap/bootstrap-0ca2c821373eb439.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST STDERR] 2014-11-25 11:12:44.961 instruments[18268:2307] WebKit Threading Violation - initial use of WebKit from a secondary thread.
info: Instruments is ready to receive commands
info: [debug] Instruments launched. Starting poll loop for new commands.
info: [debug] Setting bootstrap config keys/values
info: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
info: [debug] Socket data received (2 bytes)
info: [debug] Socket data being routed.
info: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;

info: [debug] [INST] 2014-11-25 16:12:52 +0000 Debug: evaluation finished
info: [debug] Socket data received (27 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:true}
info: [debug] Setting initial orientation to PORTRAIT
info: [debug] Pushing command to appium work queue: “au.setScreenOrientation(‘PORTRAIT’)”
info: [debug] Sending command to instruments: au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2014-11-25 16:12:52 +0000 Debug: responding with:
info: [debug] [INST] 2014-11-25 16:12:52 +0000 Debug: Running system command #1: /usr/local/Cellar/node/0.10.32/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}…
info: [debug] [INST] 2014-11-25 16:12:53 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2014-11-25 16:12:53 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2014-11-25 16:12:53 +0000 Debug: target.setDeviceOrientation(“1”)
info: [debug] [INST] 2014-11-25 16:12:54 +0000 Debug: evaluation finished
info: [debug] [INST] 2014-11-25 16:12:54 +0000 Debug: responding with:
info: [debug] [INST] 2014-11-25 16:12:54 +0000 Debug: Running system command #2: /usr/local/Cellar/node/0.10.32/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”}…
info: [debug] Socket data received (33 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:“PORTRAIT”}
info: [debug] Waiting for app source to contain elements
info: [debug] Pushing command to appium work queue: “au.mainApp().getTreeForXML()”
info: [debug] Sending command to instruments: au.mainApp().getTreeForXML()
info: [debug] [INST] 2014-11-25 16:12:55 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()
info: [debug] [INST] 2014-11-25 16:12:55 +0000 Debug: evaluating au.mainApp().getTreeForXML()
info: [debug] [INST] 2014-11-25 16:12:55 +0000 Debug: evaluation finished
info: [debug] [INST] 2014-11-25 16:12:55 +0000 Debug: responding with:ll,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/0",“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/1",“x”:0,“y”:0.6875,“width”:375,“height”:665.625},">":[{“UIAToolbar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/0",“x”:0,“y”:0.6875,“width”:375,“height”:23.4375},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/0/0",“x”:0,“y”:0.1015625,“width”:375,“height”:0.5859375},">":[]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/0/1",“x”:0,“y”:0.6875,“width”:375,“height”:23.4375},">":[]}}]}},{“UIACollectionView”:{"@":{“name”:null,“label”:null,“value”:“page 1 of 3”,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1",“x”:0,“y”:0.6875,“width”:375,“height”:665.625},">":[{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/0",“x”:0,“y”:0.6874910593032837,“width”:375,“height”:248.53512573242188},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/0/0",“x”:0,“y”:0.6874910593032837,“width”:375,“height”:248.53512573242188},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/1",“x”:11.71875,“y”:260.84375,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/1/0",“x”:11.71875,“y”:260.84375,“width”:169.921875,“height”:169.921875},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/2",“x”:193.359375,“y”:260.84375,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/2/0",“x”:193.359375,“y”:260.84375,“width”:169.921875,“height”:169.921875},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/3",“x”:11.71875,“y”:442.484375,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/3/0",“x”:11.71875,“y”:442.484375,“width”:169.921875,“height”:169.921875},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/4",“x”:193.359375,“y”:442.484375,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/1/4/0",“x”:193.359375,“y”:442.484375,“width”:169.921875,“height”:169.921875},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/5",“x”:11.71875,“y”:624.125,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/5/0",“x”:11.71875,“y”:624.125,“width”:169.921875,“height”:169.921875},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/6",“x”:193.359375,“y”:624.125,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/6/0",“x”:193.359375,“y”:624.125,“width”:169.921875,“height”:169.921875},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/7",“x”:0,“y”:0.6875,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:“L”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/7/0",“x”:0,“y”:0,“width”:145,“height”:145},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/8",“x”:0,“y”:0.6875,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:“Q”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/8/0",“x”:0,“y”:0,“width”:145,“height”:145},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/9",“x”:0,“y”:0.6875,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:“K”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/9/0",“x”:0,“y”:0,“width”:145,“height”:145},">":[]}}]}},{“UIACollectionCell”:{"@":{“name”:null,“label”:null,“value”:0,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/10",“x”:0,“y”:0.6875,“width”:169.921875,“height”:169.921875},">":[{“UIAImage”:{"@":{“name”:“S”,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/1/10/0",“x”:0,“y”:0,“width”:145,“height”:145},">":[]}}]}}]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/2",“x”:366.796875,“y”:509.28125,“width”:93.75,“height”:72.65625},">":[]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/3",“x”:389.0625,“y”:538.578125,“width”:31.640625,“height”:25.78125},">":[]}},{“UIAToolbar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/4",“x”:0,“y”:666.3125,“width”:375,“height”:51.5625},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/4/0",“x”:0,“y”:665.7265625,“width”:375,“height”:0.5859375},">":[]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/4/1",“x”:0,“y”:666.3125,“width”:375,“height”:51.5625},">":[]}}]}},{“UIATabBar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5",“x”:0,“y”:608.890625,“width”:375,“height”:57.421875},">":[{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/1/5/0",“x”:0,“y”:608.3046875,“width”:375,“height”:0.5859375},">":[]}},{“UIAImage”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5/1",“x”:0,“y”:608.890625,“width”:375,“height”:57.421875},">":[]}},{“UIAButton”:{"@":{“name”:“Create”,“label”:“Create”,“value”:1,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5/2",“x”:2.34375,“y”:610.0625,“width”:70.3125,“height”:56.25},">":[]}},{“UIAButton”:{"@":{“name”:“Post Box”,“label”:“Post Box”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5/3",“x”:77.34375,“y”:610.0625,“width”:70.3125,“height”:56.25},">":[]}},{“UIAButton”:{"@":{“name”:“Photos”,“label”:“Photos”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5/4",“x”:152.34375,“y”:610.0625,“width”:70.3125,“height”:56.25},">":[]}},{“UIAButton”:{"@":{“name”:“Favorites”,“label”:“Favorites”,
info: [debug] [INST] “value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5/5",“x”:227.34375,“y”:610.0625,“width”:70.3125,“height”:56.25},">":[]}},{“UIAButton”:{"@":{“name”:“More”,“label”:“More”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/1/5/6",“x”:302.34375,“y”:610.0625,“width”:70.3125,“height”:56.25},">":[]}}]}}]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:false,“hint”:null,“path”:"/0/2",“x”:0,“y”:0.6875,“width”:375,“height”:665.625},">":[]}},{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/3",“x”:0,“y”:0.6875,“width”:375,“height”:665.625},">":[{“UIAStatusBar”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0/3/0",“x”:0,“y”:0.6875,“width”:375,“height”:23.4375},">":[{“UIAElement”:{"@":{“name”:“3 of 5 bars, signal strength”,“label”:“3 of 5 bars, signal strength”,“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/3/0/0",“x”:7.03125,“y”:0.6875,“width”:41.015625,“height”:23.4375},">":[]}},{“UIAElement”:{"@":{“name”:“T-Mobile network”,“label”:“T-Mobile network”,“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/3/0/1",“x”:51.5625,“y”:0.6875,“width”:56.25,“height”:23.4375},">":[]}},{“UIAElement”:{"@":{“name”:“3 of 3 Wi-Fi bars”,“label”:“3 of 3 Wi-Fi bars”,“value”:“paperlesspost”,“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/3/0/2",“x”:113.671875,“y”:0.6875,“width”:15.234375,“height”:23.4375},">":[]}},{“UIAElement”:{"@":{“name”:“11:12 AM”,“label”:“11:12 AM”,“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/3/0/3",“x”:159.375,“y”:0.6875,“width”:57.421875,“height”:23.4375},">":[]}},{“UIAElement”:{"@":{“name”:“Bluetooth on”,“label”:“Bluetooth on”,“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/3/0/4",“x”:314.0625,“y”:0.6875,“width”:9.375,“height”:23.4375},">":[]}},{“UIAElement”:{"@":{“name”:“50% battery power, Charging”,“label”:“50% 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/3/0/5",“x”:330.46875,“y”:0.6875,“width”:38.671875,“height”:23.4375},">":[]}}]}}]}}]}}}
info: [debug] [INST] 2014-11-25 16:12:55 +0000 Debug: Running system command #3: /usr/local/Cellar/node/0.10.32/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”:“PaperlessPost”,“label”:“PaperlessPost”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“vi…
info: [debug] Socket data received (8192 bytes)
info: [debug] Socket data received (3578 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{”@":{“name”:“PaperlessPost”,“label”:“PaperlessPost”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:"/0",“x”:0,“y”:24.125,“width”:375,“height”:642.1875},">":[{“UIAWindow”:{"@":{“name”:null,“label”:null,“value”:null,“dom”:nu
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId 8a38d072-ebe0-4dac-afc0-b88b18afed60
info: <-- POST /wd/hub/session 303 9699.669 ms - 9
info: --> GET /wd/hub/session/8a38d072-ebe0-4dac-afc0-b88b18afed60 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“webStorageEnabled”:false,“locationContextEnabled”:false,“browserName”:“iOS”,“platform”:“MAC”,“javascriptEnabled”:true,“databaseEnabled”:false,“takesScreenshot”:true,“networkConnectionEnabled”:false,“warnings”:{},“desired”:{“platformName”:“iOS”,“deviceName”:“biggiesmalls”,“udid”:“5b061a4303fcexxxxx2e525e8156723f”,“bundleId”:“com.paperless.paperlesspost”},“platformName”:“iOS”,“deviceName”:“biggiesmalls”,“udid”:“5b061a4303fce12cxxxxxxe525e8156723f”,“bundleId”:“com.paperless.paperlesspost”},“sessionId”:“8a38d072-ebe0-4dac-afc0-b88b18afed60”}

Sample code used:
$driver_appium.button(‘Post Box’).click
sleep 1
$driver_appium.textfields(‘Email address’).set "[email protected]"
$driver_appium.textfield(‘Password’).type ‘pwd123cat’
sleep 2
$driver_appium.button(‘Log In’).click
sleep 3
expect($driver_appium.find(‘Email address’)).to be_falsey

I think I figured out the issue with the email address field. It is not visible to appium.
Do you have any best practices for app developers to make automation friendly apps?

i dont know if its a typo ir if you code is written thay way, but to find email fiel, you wrote textfields, to find password, you wrote textfield.

but it looks to me that appium didnt get the textfields when ran the command au.mainApp().getTreeForXML(), not even not visible… if so, thats why you are not able to run succesfully your test.

have you tried using selenium webdriver? its easier to find the fields, and you can find even invisible fields

Hi Skart,
If you can have you developers set accessibility labels on all the elements in your app that you wish to automate, you can then find_element by id which is much more robust.

And yes, they definitely will have to make those fields visible for you to inspect with.