还未发布过话题
  • Appium python 框架 at 2015年10月14日

    这个弹出框的元素没有办法用 appium 定位,所以没有 xpath。这个弹出框是 modal view 的 ,

  • Appium python 框架 at 2015年10月14日

    hi 大师 ,我碰到了一个问题,可否给些意见?我用的 app 是混合型 app,web 开发通过 angular js,当用 appium 的时候找不到 pop
    view 的元素,如截图中弹出来的 pick a doctor 界面上的元素 cancel 就是找不到。 这个是要怎么解决呢?。server log 如下:
    Tests-MacBook-Pro-2:python testuser$ python /Users/testuser/Desktop/Appium\ Example/sample-code/sample-code/examples/python/android_AuroraMakeappointment.py
    test_webview (main.AndroidWebViewTests) ... info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"4.4","appPackage":"com.covidien.rpm","app":"/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk","platformName":"Android","deviceName":"SM-T331C"}}
    info: Client User-Agent string: Python-urllib/2.7
    info: [debug] No appActivity desired capability or server param. Parsing from apk.
    info: [debug] Using local app from desired caps: /Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk
    info: [debug] Creating new appium session e2cefc8e-48a5-488c-ac58-d24da9e8d744
    info: Starting android appium
    info: [debug] Getting Java version
    info: Java version is: 1.7.0_79
    info: [debug] Checking whether adb is present
    info: [debug] Using adb from /users/testuser/Library/Android/sdk/platform-tools/adb
    info: [debug] Parsing package and activity from app manifest
    info: [debug] Checking whether aapt is present
    info: [debug] Using aapt from /users/testuser/Library/Android/sdk/build-tools/22.0.1/aapt
    info: [debug] Extracting package and launch activity from manifest.
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/build-tools/22.0.1/aapt dump badging "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk"
    info: [debug] badging package: com.covidien.rpm
    info: [debug] badging act: com.covidien.rpm.activity.MainWebActivity
    info: [debug] Parsed package and activity are: com.covidien.rpm/com.covidien.rpm.activity.MainWebActivity
    info: [debug] Using fast reset? true
    info: [debug] Preparing device for session
    info: [debug] Checking whether app is actually present
    info: Retrieving device
    info: [debug] Trying to find a connected android device
    info: [debug] Getting connected devices...
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb devices
    info: [debug] 1 device(s) connected
    info: Found device a4aa956805cd2952
    info: [debug] Setting device id to a4aa956805cd2952
    info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 wait-for-device
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "echo 'ready'"
    info: [debug] Starting logcat capture
    info: [debug] Getting device API level
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 19
    info: Device API level is: 19
    info: [debug] Extracting strings for language: default
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "getprop persist.sys.language"
    info: [debug] Current device persist.sys.language: en
    info: [debug] java -jar "/usr/local/lib/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools.jar" "stringsFromApk" "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk" "/tmp/com.covidien.rpm" en
    info: [debug] No strings.xml for language 'en', getting default strings.xml
    info: [debug] java -jar "/usr/local/lib/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools.jar" "stringsFromApk" "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk" "/tmp/com.covidien.rpm"
    info: [debug] Reading strings from converted strings.json
    info: [debug] Setting language to default
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 push "/tmp/com.covidien.rpm/strings.json" /data/local/tmp
    info: [debug] Checking whether aapt is present
    info: [debug] Using aapt from /users/testuser/Library/Android/sdk/build-tools/22.0.1/aapt
    info: [debug] Retrieving process from manifest.
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/build-tools/22.0.1/aapt dump xmltree "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk" AndroidManifest.xml
    info: [debug] Set app process to: com.covidien.rpm
    info: [debug] Not uninstalling app since server not started with --full-reset
    info: [debug] Checking app cert for /Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk.
    info: [debug] executing cmd: java -jar /usr/local/lib/node_modules/appium/node_modules/appium-adb/jars/verify.jar "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk"
    info: [debug] App already signed.
    info: [debug] Zip-aligning /Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk
    info: [debug] Checking whether zipalign is present
    info: [debug] Using zipalign from /users/testuser/Library/Android/sdk/build-tools/22.0.1/zipalign
    info: [debug] Zip-aligning apk.
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/build-tools/22.0.1/zipalign -f 4 "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk" /var/folders/7p/vc6l_9b12rl7f6k4xrx44wxm0000gn/T/115914-9413-fsi6k8/appium.tmp
    info: [debug] MD5 for app is ac0eb8b8d4482d7c3b6d5a7feb3db4ed
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "ls /data/local/tmp/ac0eb8b8d4482d7c3b6d5a7feb3db4ed.apk"
    info: [debug] Getting install status for com.covidien.rpm
    info: [debug] Getting device API level
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 19
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "pm list packages -3 com.covidien.rpm"
    info: [debug] App is installed
    info: Installing App
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "mkdir -p /data/local/tmp/"
    info: [debug] Removing any old apks
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "ls /data/local/tmp/*.apk"
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell rm "/data/local/tmp/29649242b53e9a67ba855b067422713c.apk"
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 push "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk" /data/local/tmp/ac0eb8b8d4482d7c3b6d5a7feb3db4ed.apk
    info: [debug] Uninstalling com.covidien.rpm
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "am force-stop com.covidien.rpm"
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 uninstall com.covidien.rpm
    info: [debug] App was uninstalled
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "pm install -r /data/local/tmp/ac0eb8b8d4482d7c3b6d5a7feb3db4ed.apk"
    info: [debug] Forwarding system:4724 to device:4724
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 forward tcp:4724 tcp:4724
    info: [debug] Pushing appium bootstrap to device...
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 push "/usr/local/lib/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar" /data/local/tmp/
    info: [debug] Pushing settings apk to device...
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 install "/usr/local/lib/node_modules/appium/build/settings_apk/settings_apk-debug.apk"
    info: [debug] Pushing unlock helper app to device...
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 install "/usr/local/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk"
    info: Starting App
    info: [debug] Attempting to kill all 'uiautomator' processes
    info: [debug] Getting all processes with 'uiautomator'
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "ps 'uiautomator'"
    info: [debug] No matching processes found
    info: [debug] Running bootstrap
    info: [debug] spawning: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.covidien.rpm -e disableAndroidWatchers false
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
    info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
    info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
    info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
    info: [debug] [BOOTSTRAP] [debug] Loading json...
    info: [debug] Waking up device if it's not alive
    info: [debug] Pushing command to appium work queue: ["wake",{}]
    info: [debug] [BOOTSTRAP] [debug] json loading complete.
    info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
    info: [debug] [BOOTSTRAP] [debug] Client connected
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: wake
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "dumpsys window"
    info: [debug] Screen already unlocked, continuing.
    info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"\/data\/local\/tmp","status":0}
    info: [debug] dataDir set to: /data/local/tmp
    info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}
    info: [debug] Getting device API level
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "getprop ro.build.version.sdk"
    info: [debug] Device is at API Level 19
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.covidien.rpm/com.covidien.rpm.activity.MainWebActivity"
    info: [debug] Waiting for pkg "com.covidien.rpm" and activity "com.covidien.rpm.activity.MainWebActivity" to be focused
    info: [debug] Getting focused package and activity
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "dumpsys window windows"
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "getprop ro.build.version.release"
    info: [debug] Device is at release version 4.4.2
    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 e2cefc8e-48a5-488c-ac58-d24da9e8d744
    info: <-- POST /wd/hub/session 303 22694.460 ms - 74
    info: --> GET /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744 {}
    info: [debug] Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"4.4.2","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformVersion":"4.4","appPackage":"com.covidien.rpm","app":"/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk","platformName":"Android","deviceName":"SM-T331C"},"appPackage":"com.covidien.rpm","app":"/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk","platformName":"Android","deviceName":"a4aa956805cd2952"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- GET /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744 200 1.369 ms - 697 {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"4.4.2","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformVersion":"4.4","appPackage":"com.covidien.rpm","app":"/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk","platformName":"Android","deviceName":"SM-T331C"},"appPackage":"com.covidien.rpm","app":"/Users/testuser/Desktop/Appium Example/sample-code/sample-code/apps/Aurora.apk","platformName":"Android","deviceName":"a4aa956805cd2952"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/elements {"using":"class name","sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","value":"android.widget.EditText"}
    info: [debug] Waiting up to 0ms for condition
    info: [debug] Pushing command to appium work queue: ["find",{"strategy":"class name","selector":"android.widget.EditText","context":"","multiple":true}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"class name","selector":"android.widget.EditText","context":"","multiple":true}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: find
    info: [debug] [BOOTSTRAP] [debug] Finding android.widget.EditText using CLASS_NAME with the contextId: multiple: true
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.EditText]
    info: [debug] [BOOTSTRAP] [debug] getElements selector:UiSelector[CLASS=android.widget.EditText]
    info: [debug] [BOOTSTRAP] [debug] Element[] is null: (0)
    info: [debug] [BOOTSTRAP] [debug] getElements tmp selector:UiSelector[CLASS=android.widget.EditText, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Element[] is null: (1)
    info: [debug] [BOOTSTRAP] [debug] getElements tmp selector:UiSelector[CLASS=android.widget.EditText, INSTANCE=1]
    info: [debug] [BOOTSTRAP] [debug] Element[] is null: (2)
    info: [debug] [BOOTSTRAP] [debug] getElements tmp selector:UiSelector[CLASS=android.widget.EditText, INSTANCE=2]
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":[{"ELEMENT":"1"},{"ELEMENT":"2"}],"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":[{"ELEMENT":"1"},{"ELEMENT":"2"}],"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/elements 200 184.366 ms - 105 {"status":0,"value":[{"ELEMENT":"1"},{"ELEMENT":"2"}],"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/1/value {"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","id":"1","value":["j","i","n","g","j","i","n","g"]}
    info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"1","text":"jingjing","replace":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"1","text":"jingjing","replace":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: setText
    info: [debug] [BOOTSTRAP] [debug] Using element passed in.
    info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
    info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: jingjing
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/1/value 200 6958.115 ms - 76 {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/2/value {"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","id":"2","value":["1","2","3","4","5","6"]}
    info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"2","text":"123456","replace":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"2","text":"123456","replace":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: setText
    info: [debug] [BOOTSTRAP] [debug] Using element passed in.
    info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
    info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: 123456
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/2/value 200 4677.353 ms - 76 {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element {"using":"name","sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","value":"Login"}
    warn: [DEPRECATED] The name locator strategy has been deprecated and will be removed. Please use the accessibility id locator strategy instead.
    info: [debug] Waiting up to 0ms for condition
    info: [debug] Pushing command to appium work queue: ["find",{"strategy":"name","selector":"Login","context":"","multiple":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Login","context":"","multiple":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: find
    info: [debug] [BOOTSTRAP] [debug] Finding Login using NAME with the contextId: multiple: false
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=Login, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"3"},"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"3"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element 200 51.049 ms - 87 {"status":0,"value":{"ELEMENT":"3"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/3/click {"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","id":"3"}
    info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"3"}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"3"}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: click
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/3/click 200 128.167 ms - 76 {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element {"using":"name","sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","value":"Make New Appointment"}
    info: [debug] Waiting up to 0ms for condition
    info: [debug] Pushing command to appium work queue: ["find",{"strategy":"name","selector":"Make New Appointment","context":"","multiple":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Make New Appointment","context":"","multiple":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: find
    info: [debug] [BOOTSTRAP] [debug] Finding Make New Appointment using NAME with the contextId: multiple: false
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=Make New Appointment, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"4"},"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"4"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element 200 101.800 ms - 87 {"status":0,"value":{"ELEMENT":"4"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/4/click {"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","id":"4"}
    info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"4"}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"4"}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: click
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
    info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element/4/click 200 641.900 ms - 76 {"status":0,"value":true,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: --> POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element {"using":"name","sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744","value":"Cancel"}
    info: [debug] Waiting up to 0ms for condition
    info: [debug] Pushing command to appium work queue: ["find",{"strategy":"name","selector":"Cancel","context":"","multiple":false}]
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Cancel","context":"","multiple":false}}
    info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
    info: [debug] [BOOTSTRAP] [debug] Got command action: find
    info: [debug] [BOOTSTRAP] [debug] Finding Cancel using NAME with the contextId: multiple: false
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=Cancel, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=Cancel, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
    info: [debug] [BOOTSTRAP] [debug] Finding Cancel using NAME with the contextId: multiple: false
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=Cancel, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=Cancel, INSTANCE=0]
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"No element found","status":7}
    info: [debug] Condition unmet after 1119ms. Timing out.
    info: [debug] Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search parameters.","origValue":"No element found"},"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- POST /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744/element 500 1123.018 ms - 195
    ERROR
    info: --> DELETE /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744 {}
    info: Shutting down appium session
    info: [debug] Pressing the HOME button
    info: [debug] executing cmd: /users/testuser/Library/Android/sdk/platform-tools/adb -s a4aa956805cd2952 shell "input keyevent 3"
    info: [debug] Stopping logcat capture
    info: [debug] Logcat terminated with code null, signal SIGTERM
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
    info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"OK, shutting down","status":0}
    info: [debug] [BOOTSTRAP] [debug] Closed client connection
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
    info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
    info: [debug] [UIAUTOMATOR STDOUT] Time: 27.235
    info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
    info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
    info: [debug] UiAutomator shut down normally
    info: [debug] Cleaning up android objects
    info: [debug] Cleaning up appium session
    info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}
    info: <-- DELETE /wd/hub/session/e2cefc8e-48a5-488c-ac58-d24da9e8d744 200 1131.054 ms - 76 {"status":0,"value":null,"sessionId":"e2cefc8e-48a5-488c-ac58-d24da9e8d744"}

    ERROR: test_webview (main.AndroidWebViewTests)

    Traceback (most recent call last):
    File "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/examples/python/android_AuroraMakeappointment.py", line 43, in test_webview
    button2=self.driver.find_element_by_name('Cancel')
    File "/Library/Python/2.7/site-packages/selenium-2.47.3-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 330, in find_element_by_name
    return self.find_element(by=By.NAME, value=name)
    File "/Library/Python/2.7/site-packages/selenium-2.47.3-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 712, in find_element
    {'using': by, 'value': value})['value']
    File "/Library/Python/2.7/site-packages/selenium-2.47.3-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 201, in execute
    self.error_handler.check_response(response)
    File "/Users/testuser/Desktop/Appium Example/sample-code/sample-code/examples/python/appium/webdriver/errorhandler.py", line 29, in check_response
    raise wde
    NoSuchElementException: Message: An element could not be located on the page using the given search parameters.
    截图在附近