Created
July 9, 2017 09:20
-
-
Save wangtao169447/3e42e07ef09263a06dc2415801a19dc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Appium] Welcome to Appium v1.6.6-beta | |
[Appium] Non-default server args: | |
[Appium] sessionOverride: true | |
[Appium] Appium REST http interface listener started on 0.0.0.0:4723 | |
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"}} | |
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"},null,null] | |
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1499591616230 (17:13:36 GMT+0800 (CST)) | |
[Appium] Creating new AndroidUiautomator2Driver (v0.3.4) session | |
[Appium] Capabilities: | |
[Appium] platformVersion: '7.0' | |
[Appium] deviceName: '3HX7N17115002555' | |
[Appium] automationName: 'uiautomator2' | |
[Appium] platformName: 'Android' | |
[Appium] app: '/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
[BaseDriver] Session created with session id: 67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 | |
[BaseDriver] Using local app '/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
[debug] [UiAutomator2] Checking whether app is actually present | |
[UiAutomator2] UIAutomator2 Driver version:0.3.4 | |
[debug] [AndroidDriver] Getting Java version | |
[AndroidDriver] Java version is: 1.8.0_91 | |
[ADB] Checking whether adb is present | |
[ADB] Using adb from /usr/local/opt/android-sdk/platform-tools/adb | |
[AndroidDriver] Retrieving device list | |
[debug] [ADB] Trying to find a connected android device | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[AndroidDriver] Looking for a device with Android '7.0' | |
[debug] [ADB] Setting device id to 3HX7N17115002555 | |
[ADB] Getting device platform version | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.build.version.release"] | |
[AndroidDriver] Using device: 3HX7N17115002555 | |
[ADB] Checking whether adb is present | |
[ADB] Using adb from /usr/local/opt/android-sdk/platform-tools/adb | |
[debug] [ADB] Setting device id to 3HX7N17115002555 | |
[debug] [AndroidDriver] Parsing package and activity from app manifest | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[ADB] Extracting package and launch activity from manifest | |
[debug] [ADB] badging package: io.appium.android.apis | |
[debug] [ADB] badging act: io.appium.android.apis.ApiDemos | |
[debug] [AndroidDriver] Parsed package and activity are: io.appium.android.apis/io.appium.android.apis.ApiDemos | |
[ADB] Getting device platform version | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.build.version.release"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","wm","size"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.product.model"] | |
[debug] [ADB] Current device property 'ro.product.model': MHA-AL00 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.product.manufacturer"] | |
[debug] [ADB] Current device property 'ro.product.manufacturer': HUAWEI | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.uiautomator2.server"] | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","wait-for-device"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","echo","ping"] | |
[debug] [Logcat] Starting logcat capture | |
[debug] [AndroidDriver] Pushing settings apk to device... | |
[debug] [ADB] Getting install status for io.appium.settings | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.settings"] | |
[debug] [ADB] App is installed | |
[debug] [ADB] Getting package info for io.appium.settings | |
[debug] [ADB] Getting connected devices... | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","package","io.appium.settings"] | |
[ADB] Cannot read version codes of /usr/local/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk and/or io.appium.settings. Assuming correct app version is already installed | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.build.version.sdk"] | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","package","io.appium.settings"] | |
[debug] [AndroidDriver] Pushing unlock helper app to device... | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","install","/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"] | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","install","/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"] | |
[debug] [ADB] Application '/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk' already installed. Continuing. | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","appops","set","io.appium.settings","android:mock_location","allow"] | |
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200 | |
[debug] [ADB] Forwarding system: 8200 to device: 6790 | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","forward","tcp:8200","tcp:6790"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","window"] | |
[AndroidDriver] Screen already unlocked, doing nothing | |
[debug] [AndroidDriver] Extracting strings from apk /Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk null /var/folders/f7/mk0478xj21j_n422kl1ns_hc0000gn/T/io.appium.android.apis | |
[debug] [ADB] Extracting strings for language: default | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","persist.sys.locale"] | |
[debug] [ADB] Current device property 'persist.sys.locale': zh-Hans-CN | |
[debug] [ADB] No strings.xml for language 'zh', getting default strings.xml | |
[debug] [ADB] Reading strings from converted strings.json | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","push","/var/folders/f7/mk0478xj21j_n422kl1ns_hc0000gn/T/io.appium.android.apis/strings.json","/data/local/tmp"] | |
[debug] [ADB] Checking app cert for /Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk. | |
[debug] [ADB] App already signed. | |
[debug] [ADB] Zip-aligning '/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
[ADB] Checking whether zipalign is present | |
[ADB] Using zipalign from /usr/local/opt/android-sdk/build-tools/25.0.2/zipalign | |
[debug] [ADB] Zip-aligning apk. | |
[AndroidDriver] Remote apk path is /data/local/tmp/29649242b53e9a67ba855b067422713c.apk | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","ls","/data/local/tmp/29649242b53e9a67ba855b067422713c.apk"] | |
[debug] [AndroidDriver] Checking if app is installed | |
[debug] [ADB] Getting install status for io.appium.android.apis | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.android.apis"] | |
[debug] [ADB] App is installed | |
[AndroidDriver] Apk is already on remote and installed, resetting | |
[debug] [AndroidDriver] Running fast reset (stop and clear) | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.android.apis"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","clear","io.appium.android.apis"] | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[debug] [ADB] Getting install status for io.appium.uiautomator2.server | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.uiautomator2.server"] | |
[debug] [ADB] App is installed | |
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.uiautomator2.server.test"] | |
[debug] [ADB] App is installed | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","package","io.appium.uiautomator2.server"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.uiautomator2.server"] | |
[UiAutomator2] Starting uiautomator2 server v0.1.5 with cmd: am,instrument,-w,io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner | |
[UiAutomator2] running command... | |
adb -s 3HX7N17115002555 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner... | |
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online... | |
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body | |
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body | |
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"SESSIONID\",\"status\":0,\"value\":\"Status Invoked\"}" | |
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"},"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","deviceUDID":"3HX7N17115002555","deviceScreenSize":"1080x1920","deviceModel":"MHA-AL00","deviceManufacturer":"HUAWEI","appPackage":"io.appium.android.apis"}} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"56f26892-9d08-45a6-a781-33f65e1e41e3","status":0,"value":"Created Session"} | |
[UiAutomator2] UiAutomator2 did not start the activity we were waiting for, 'io.appium.android.apis/io.appium.android.apis.ApiDemos'. Starting it ourselves | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","start","-W","-n","io.appium.android.apis/io.appium.android.apis.ApiDemos","-S","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"] | |
[debug] [ADB] Waiting for activity matching pkg: 'io.appium.android.apis' and activity: 'io.appium.android.apis.ApiDemos' to be focused | |
[debug] [ADB] Possible activities, to be checked: io.appium.android.apis.ApiDemos, io.appium.android.apis.io.appium.android.apis.ApiDemos | |
[debug] [ADB] Getting focused package and activity | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","window","windows"] | |
[debug] [ADB] Found package: 'io.appium.android.apis' and fully qualified activity name : 'io.appium.android.apis.ApiDemos' | |
[Appium] New AndroidUiautomator2Driver session created successfully, session 67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 added to master session list | |
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1499591625558 (17:13:45 GMT+0800 (CST)) | |
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"} | |
[HTTP] <-- POST /wd/hub/session 200 9336 ms - 283 | |
[HTTP] --> POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/elements {"using":"xpath","sessionId":"67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460","value":"//android.widget.TextView"} | |
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["xpath","//android.widget.TextView","67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460"] | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Waiting up to 0 ms for condition | |
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/elements] with body: {"strategy":"xpath","selector":"//android.widget.TextView","context":"","multiple":true} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"56f26892-9d08-45a6-a781-33f65e1e41e3","status":0,"value":[{"ELEMENT":"45fb29df-d20a-43a0-b281-97c68b2e0b40"},{"ELEMENT":"8d999dfb-b3ba-44af-b502-52b431f22f78"},{"ELEMENT":"9dd03d7e-2d7c-4d4e-b47d-ba894359b4c9"},{"ELEMENT":"e3e15ef4-c0ce-489f-b9f6-044bc3a6604d"},{"ELEMENT":"d91a810f-1c8a-45f8-9f18-886ed9000bd9"},{"ELEMENT":"e870ee9a-132e-49c3-a629-9dc037aa5aeb"},{"ELEMENT":"b0849d5a-bae6-434a-9797-6a1a4eee8e9d"},{"ELEMENT":"a9bbb0ea-6b2f-48e5-9a9e-cd8af4c6eea9"},{"ELEMENT":"a45b01cd-962c-4e2c-938c-1e94b13152c9"},{"ELEMENT":"ac5b76da-f7f9-4fda-b28d-af331bfc4dcd"},{"ELEMENT":"8551f78e-3ae7-426c-9ee5-509ace9a54ec"},{"ELEMENT":"de5358f4-1331-4b5c-8610-806211baf626"}]} | |
[debug] [MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"45fb29df-d20a-43a0-b281-97c68b2e0b40"},{"ELEMENT":"8d999dfb-b3ba-44af-b502-52b431f22f78"},{"ELEMENT":"9dd03d7e-2d7c-4d4e-b47d-ba894359b4c9"},{"ELEMENT":"e3e15ef4-c0ce-489f-b9f6-044bc3a6604d"},{"ELEMENT":"d91a810f-1c8a-45f8-9f18-886ed9000bd9"},{"ELEMENT":"e870ee9a-132e-49c3-a629-9dc037aa5aeb"},{"ELEMENT":"b0849d5a-bae6-434a-9797-6a1a4eee8e9d"},{"ELEMENT":"a9bbb0ea-6b2f-48e5-9a9e-cd8af4c6eea9"},{"ELEMENT":"a45b01cd-962c-4e2c-938c-1e94b13152c9"},{"ELEMENT":"ac5b76da-f7f9-4fda-b28d-af331bfc4dcd"},{"ELEMENT":"8551f78e-3ae7-426c-9ee5-509ace9a54ec"},{"ELEMENT":"de5358f4-1331-4b5c-8610-806211baf626"}] | |
[HTTP] <-- POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/elements 200 111 ms - 685 | |
[HTTP] --> GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/45fb29df-d20a-43a0-b281-97c68b2e0b40/text {} | |
[MJSONWP] Driver proxy active, passing request on via HTTP proxy | |
[debug] [JSONWP Proxy] Proxying [GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/45fb29df-d20a-43a0-b281-97c68b2e0b40/text] to [GET http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/element/45fb29df-d20a-43a0-b281-97c68b2e0b40/text] with body: {} | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"56f26892-9d08-45a6-a781-33f65e1e41e3\",\"status\":0,\"value\":\"API Demos\"}" | |
[JSONWP Proxy] Replacing sessionId 56f26892-9d08-45a6-a781-33f65e1e41e3 with 67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 | |
[HTTP] <-- GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/45fb29df-d20a-43a0-b281-97c68b2e0b40/text 200 32 ms - 83 | |
[HTTP] --> POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element {"using":"xpath","sessionId":"67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460","value":"//android.widget.TextView[contains(@text, \"Animat\")]"} | |
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: ["xpath","//android.widget.TextView[contains(@text, \"Animat\")]","67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460"] | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Waiting up to 0 ms for condition | |
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/element] with body: {"strategy":"xpath","selector":"//android.widget.TextView[contains(@text, \"Animat\")]","context":"","multiple":false} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"56f26892-9d08-45a6-a781-33f65e1e41e3","status":0,"value":{"ELEMENT":"454270ca-3709-4e12-8c31-89c081a4d451"}} | |
[debug] [MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"454270ca-3709-4e12-8c31-89c081a4d451"} | |
[HTTP] <-- POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element 200 34 ms - 122 | |
[HTTP] --> GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/454270ca-3709-4e12-8c31-89c081a4d451/text {} | |
[MJSONWP] Driver proxy active, passing request on via HTTP proxy | |
[debug] [JSONWP Proxy] Proxying [GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/454270ca-3709-4e12-8c31-89c081a4d451/text] to [GET http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/element/454270ca-3709-4e12-8c31-89c081a4d451/text] with body: {} | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"56f26892-9d08-45a6-a781-33f65e1e41e3\",\"status\":0,\"value\":\"Animation\"}" | |
[JSONWP Proxy] Replacing sessionId 56f26892-9d08-45a6-a781-33f65e1e41e3 with 67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 | |
[HTTP] <-- GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/454270ca-3709-4e12-8c31-89c081a4d451/text 200 23 ms - 83 | |
[HTTP] --> POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element {"using":"accessibility id","sessionId":"67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460","value":"App"} | |
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: ["accessibility id","App","67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460"] | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Waiting up to 0 ms for condition | |
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/element] with body: {"strategy":"accessibility id","selector":"App","context":"","multiple":false} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"56f26892-9d08-45a6-a781-33f65e1e41e3","status":0,"value":{"ELEMENT":"f9796fce-b313-4555-ac9b-fb7ae383749b"}} | |
[debug] [MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"f9796fce-b313-4555-ac9b-fb7ae383749b"} | |
[HTTP] <-- POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element 200 24 ms - 122 | |
[HTTP] --> POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/f9796fce-b313-4555-ac9b-fb7ae383749b/click {"sessionId":"67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460","id":"f9796fce-b313-4555-ac9b-fb7ae383749b"} | |
[debug] [MJSONWP] Calling AppiumDriver.click() with args: ["f9796fce-b313-4555-ac9b-fb7ae383749b","67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460"] | |
[debug] [JSONWP Proxy] Proxying [POST /element/f9796fce-b313-4555-ac9b-fb7ae383749b/click] to [POST http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/element/f9796fce-b313-4555-ac9b-fb7ae383749b/click] with body: {"element":"f9796fce-b313-4555-ac9b-fb7ae383749b"} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"56f26892-9d08-45a6-a781-33f65e1e41e3","status":0,"value":true} | |
[debug] [MJSONWP] Responding to client with driver.click() result: true | |
[HTTP] <-- POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/f9796fce-b313-4555-ac9b-fb7ae383749b/click 200 1112 ms - 76 | |
[HTTP] --> POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/elements {"using":"-android uiautomator","sessionId":"67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460","value":"new UiSelector().clickable(true)"} | |
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["-android uiautomator","new UiSelector().clickable(true)","67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460"] | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Waiting up to 0 ms for condition | |
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/elements] with body: {"strategy":"-android uiautomator","selector":"new UiSelector().clickable(true)","context":"","multiple":true} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"56f26892-9d08-45a6-a781-33f65e1e41e3","status":0,"value":[{"ELEMENT":"29bff5af-7096-4397-bade-c0719af1f5e8"},{"ELEMENT":"438800c8-9332-4d5e-ad17-14eb2fb8d92b"},{"ELEMENT":"2bd613e0-e16e-4304-9791-9c025af01073"},{"ELEMENT":"966515a6-cf8f-402c-b36c-f65bcaa4e713"},{"ELEMENT":"62ac503d-00d4-4704-8a58-eba4dde72155"},{"ELEMENT":"45afbdd5-3523-47c4-b12f-f13791744a17"},{"ELEMENT":"5b5e2dd2-1e2a-41a2-a5e1-172b5da3a83f"},{"ELEMENT":"27d750b0-12bc-43fb-bfb6-f9354a6f47dc"},{"ELEMENT":"8e6ec207-9056-4cf7-b0f1-9dabadac81e8"},{"ELEMENT":"9d31f961-dbdf-4280-b1d8-afc47b2ebd9d"},{"ELEMENT":"0d4ad612-594f-48c1-b53a-dae6ae0f64de"}]} | |
[debug] [MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"29bff5af-7096-4397-bade-c0719af1f5e8"},{"ELEMENT":"438800c8-9332-4d5e-ad17-14eb2fb8d92b"},{"ELEMENT":"2bd613e0-e16e-4304-9791-9c025af01073"},{"ELEMENT":"966515a6-cf8f-402c-b36c-f65bcaa4e713"},{"ELEMENT":"62ac503d-00d4-4704-8a58-eba4dde72155"},{"ELEMENT":"45afbdd5-3523-47c4-b12f-f13791744a17"},{"ELEMENT":"5b5e2dd2-1e2a-41a2-a5e1-172b5da3a83f"},{"ELEMENT":"27d750b0-12bc-43fb-bfb6-f9354a6f47dc"},{"ELEMENT":"8e6ec207-9056-4cf7-b0f1-9dabadac81e8"},{"ELEMENT":"9d31f961-dbdf-4280-b1d8-afc47b2ebd9d"},{"ELEMENT":"0d4ad612-594f-48c1-b53a-dae6ae0f64de"}] | |
[HTTP] <-- POST /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/elements 200 155 ms - 634 | |
[HTTP] --> GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/2bd613e0-e16e-4304-9791-9c025af01073/text {} | |
[MJSONWP] Driver proxy active, passing request on via HTTP proxy | |
[debug] [JSONWP Proxy] Proxying [GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/2bd613e0-e16e-4304-9791-9c025af01073/text] to [GET http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3/element/2bd613e0-e16e-4304-9791-9c025af01073/text] with body: {} | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"56f26892-9d08-45a6-a781-33f65e1e41e3\",\"status\":0,\"value\":\"Alarm\"}" | |
[JSONWP Proxy] Replacing sessionId 56f26892-9d08-45a6-a781-33f65e1e41e3 with 67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 | |
[HTTP] <-- GET /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460/element/2bd613e0-e16e-4304-9791-9c025af01073/text 200 34 ms - 79 | |
[HTTP] --> DELETE /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 {} | |
[debug] [MJSONWP] Calling AppiumDriver.deleteSession() with args: ["67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460"] | |
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1499591629139 (17:13:49 GMT+0800 (CST)) | |
[debug] [UiAutomator2] Deleting UiAutomator2 session | |
[debug] [UiAutomator2] Deleting UiAutomator2 server session | |
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/56f26892-9d08-45a6-a781-33f65e1e41e3] with no body | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"56f26892-9d08-45a6-a781-33f65e1e41e3\",\"status\":0,\"value\":\"Session deleted\"}" | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.android.apis"] | |
[debug] [Logcat] Stopping logcat capture | |
[debug] [ADB] Removing forwarded port socket connection: 8200 | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","forward","--remove","tcp:8200"] | |
[Appium] Removing session 67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 from our master session list | |
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1499591629594 (17:13:49 GMT+0800 (CST)) | |
[debug] [MJSONWP] Received response: null | |
[debug] [MJSONWP] But deleting session, so not returning | |
[debug] [MJSONWP] Responding to client with driver.deleteSession() result: null | |
[HTTP] <-- DELETE /wd/hub/session/67ea1ad0-c2e5-45ad-bd6a-1f7eaecbf460 200 457 ms - 76 | |
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"}} | |
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"},null,null] | |
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1499591629600 (17:13:49 GMT+0800 (CST)) | |
[Appium] Creating new AndroidUiautomator2Driver (v0.3.4) session | |
[Appium] Capabilities: | |
[Appium] platformVersion: '7.0' | |
[Appium] deviceName: '3HX7N17115002555' | |
[Appium] automationName: 'uiautomator2' | |
[Appium] platformName: 'Android' | |
[Appium] app: '/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
[BaseDriver] Session created with session id: becff492-8612-4c28-8fc4-6fd00e54bb5c | |
[BaseDriver] Using local app '/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
[debug] [UiAutomator2] Checking whether app is actually present | |
[UiAutomator2] UIAutomator2 Driver version:0.3.4 | |
[debug] [AndroidDriver] Getting Java version | |
[AndroidDriver] Java version is: 1.8.0_91 | |
[ADB] Checking whether adb is present | |
[ADB] Using adb from /usr/local/opt/android-sdk/platform-tools/adb | |
[AndroidDriver] Retrieving device list | |
[debug] [ADB] Trying to find a connected android device | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[AndroidDriver] Looking for a device with Android '7.0' | |
[debug] [ADB] Setting device id to 3HX7N17115002555 | |
[ADB] Getting device platform version | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.build.version.release"] | |
[AndroidDriver] Using device: 3HX7N17115002555 | |
[ADB] Checking whether adb is present | |
[ADB] Using adb from /usr/local/opt/android-sdk/platform-tools/adb | |
[debug] [ADB] Setting device id to 3HX7N17115002555 | |
[debug] [AndroidDriver] Parsing package and activity from app manifest | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[ADB] Extracting package and launch activity from manifest | |
[debug] [ADB] badging package: io.appium.android.apis | |
[debug] [ADB] badging act: io.appium.android.apis.ApiDemos | |
[debug] [AndroidDriver] Parsed package and activity are: io.appium.android.apis/io.appium.android.apis.ApiDemos | |
[ADB] Getting device platform version | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.build.version.release"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","wm","size"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.product.model"] | |
[debug] [ADB] Current device property 'ro.product.model': MHA-AL00 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.product.manufacturer"] | |
[debug] [ADB] Current device property 'ro.product.manufacturer': HUAWEI | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.uiautomator2.server"] | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","wait-for-device"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","echo","ping"] | |
[debug] [Logcat] Starting logcat capture | |
[debug] [AndroidDriver] Pushing settings apk to device... | |
[debug] [ADB] Getting install status for io.appium.settings | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.settings"] | |
[debug] [ADB] App is installed | |
[debug] [ADB] Getting package info for io.appium.settings | |
[debug] [ADB] Getting connected devices... | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[ADB] Cannot read version codes of /usr/local/lib/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk and/or io.appium.settings. Assuming correct app version is already installed | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","package","io.appium.settings"] | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","ro.build.version.sdk"] | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","package","io.appium.settings"] | |
[debug] [AndroidDriver] Pushing unlock helper app to device... | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","install","/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"] | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","install","/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk"] | |
[debug] [ADB] Application '/usr/local/lib/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk' already installed. Continuing. | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","appops","set","io.appium.settings","android:mock_location","allow"] | |
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200 | |
[debug] [ADB] Forwarding system: 8200 to device: 6790 | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","forward","tcp:8200","tcp:6790"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","window"] | |
[AndroidDriver] Screen already unlocked, doing nothing | |
[debug] [AndroidDriver] Extracting strings from apk /Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk null /var/folders/f7/mk0478xj21j_n422kl1ns_hc0000gn/T/io.appium.android.apis | |
[debug] [ADB] Extracting strings for language: default | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","getprop","persist.sys.locale"] | |
[debug] [ADB] Current device property 'persist.sys.locale': zh-Hans-CN | |
[debug] [ADB] No strings.xml for language 'zh', getting default strings.xml | |
[debug] [ADB] Reading strings from converted strings.json | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","push","/var/folders/f7/mk0478xj21j_n422kl1ns_hc0000gn/T/io.appium.android.apis/strings.json","/data/local/tmp"] | |
[debug] [ADB] Checking app cert for /Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk. | |
[debug] [ADB] App already signed. | |
[debug] [ADB] Zip-aligning '/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
[ADB] Checking whether zipalign is present | |
[ADB] Using zipalign from /usr/local/opt/android-sdk/build-tools/25.0.2/zipalign | |
[debug] [ADB] Zip-aligning apk. | |
[AndroidDriver] Remote apk path is /data/local/tmp/29649242b53e9a67ba855b067422713c.apk | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","ls","/data/local/tmp/29649242b53e9a67ba855b067422713c.apk"] | |
[debug] [AndroidDriver] Checking if app is installed | |
[debug] [ADB] Getting install status for io.appium.android.apis | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.android.apis"] | |
[debug] [ADB] App is installed | |
[AndroidDriver] Apk is already on remote and installed, resetting | |
[debug] [AndroidDriver] Running fast reset (stop and clear) | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.android.apis"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","clear","io.appium.android.apis"] | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[debug] [ADB] Getting install status for io.appium.uiautomator2.server | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.uiautomator2.server"] | |
[debug] [ADB] App is installed | |
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","pm","list","packages","io.appium.uiautomator2.server.test"] | |
[debug] [ADB] App is installed | |
[ADB] Checking whether aapt is present | |
[ADB] Using aapt from /usr/local/opt/android-sdk/build-tools/25.0.2/aapt | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","package","io.appium.uiautomator2.server"] | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.uiautomator2.server"] | |
[UiAutomator2] Starting uiautomator2 server v0.1.5 with cmd: am,instrument,-w,io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner | |
[UiAutomator2] running command... | |
adb -s 3HX7N17115002555 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner... | |
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online... | |
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body | |
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body | |
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"SESSIONID\",\"status\":0,\"value\":\"Status Invoked\"}" | |
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {"desiredCapabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"},"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","deviceUDID":"3HX7N17115002555","deviceScreenSize":"1080x1920","deviceModel":"MHA-AL00","deviceManufacturer":"HUAWEI","appPackage":"io.appium.android.apis"}} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"25a2817e-d08f-4b4f-888c-6efabf916be9","status":0,"value":"Created Session"} | |
[UiAutomator2] UiAutomator2 did not start the activity we were waiting for, 'io.appium.android.apis/io.appium.android.apis.ApiDemos'. Starting it ourselves | |
[debug] [ADB] Device API level: 24 | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","start","-W","-n","io.appium.android.apis/io.appium.android.apis.ApiDemos","-S","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"] | |
[debug] [ADB] Waiting for activity matching pkg: 'io.appium.android.apis' and activity: 'io.appium.android.apis.ApiDemos' to be focused | |
[debug] [ADB] Possible activities, to be checked: io.appium.android.apis.ApiDemos, io.appium.android.apis.io.appium.android.apis.ApiDemos | |
[debug] [ADB] Getting focused package and activity | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","dumpsys","window","windows"] | |
[debug] [ADB] Found package: 'io.appium.android.apis' and fully qualified activity name : 'io.appium.android.apis.ApiDemos' | |
[Appium] New AndroidUiautomator2Driver session created successfully, session becff492-8612-4c28-8fc4-6fd00e54bb5c added to master session list | |
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1499591638282 (17:13:58 GMT+0800 (CST)) | |
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"platformVersion":"7.0","deviceName":"3HX7N17115002555","automationName":"uiautomator2","platformName":"Android","app":"/Users/june/Desktop/sample-code-master/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"} | |
[HTTP] <-- POST /wd/hub/session 200 8684 ms - 283 | |
[HTTP] --> POST /wd/hub/session/becff492-8612-4c28-8fc4-6fd00e54bb5c/elements {"using":"xpath","sessionId":"becff492-8612-4c28-8fc4-6fd00e54bb5c","value":"//android.widget.TextView"} | |
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["xpath","//android.widget.TextView","becff492-8612-4c28-8fc4-6fd00e54bb5c"] | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator | |
[debug] [BaseDriver] Waiting up to 0 ms for condition | |
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8200/wd/hub/session/25a2817e-d08f-4b4f-888c-6efabf916be9/elements] with body: {"strategy":"xpath","selector":"//android.widget.TextView","context":"","multiple":true} | |
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"25a2817e-d08f-4b4f-888c-6efabf916be9","status":0,"value":[{"ELEMENT":"e6ef3682-48b0-4375-8791-a5e8d19221bc"},{"ELEMENT":"d77e74d6-7315-4080-9aee-dddffa01ab10"},{"ELEMENT":"57f187f0-8be5-462b-a58f-8bcd11ecd90a"},{"ELEMENT":"33f58170-f62c-4dbb-98e6-5aee425a3352"},{"ELEMENT":"25c8e452-ba18-4be3-bf53-bc40f1b51bd4"},{"ELEMENT":"6a701c79-ea45-4f6b-8cae-5259642c29e8"},{"ELEMENT":"a8a20c6c-b8e6-46fd-ad2f-bd57217313c1"},{"ELEMENT":"0772116e-5538-45a1-9b5b-8c6dd58fbbb1"},{"ELEMENT":"3993fcce-ef05-4f4c-8d4d-e84a6ea19a0e"},{"ELEMENT":"81e0e4fc-9b85-4ee6-b53f-4eefc31e08d2"},{"ELEMENT":"cbe6d81d-cfe4-46e6-a485-40ccb4ae3924"},{"ELEMENT":"f71527aa-5b2f-42ee-a0f0-a59dfda8d917"}]} | |
[debug] [MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"e6ef3682-48b0-4375-8791-a5e8d19221bc"},{"ELEMENT":"d77e74d6-7315-4080-9aee-dddffa01ab10"},{"ELEMENT":"57f187f0-8be5-462b-a58f-8bcd11ecd90a"},{"ELEMENT":"33f58170-f62c-4dbb-98e6-5aee425a3352"},{"ELEMENT":"25c8e452-ba18-4be3-bf53-bc40f1b51bd4"},{"ELEMENT":"6a701c79-ea45-4f6b-8cae-5259642c29e8"},{"ELEMENT":"a8a20c6c-b8e6-46fd-ad2f-bd57217313c1"},{"ELEMENT":"0772116e-5538-45a1-9b5b-8c6dd58fbbb1"},{"ELEMENT":"3993fcce-ef05-4f4c-8d4d-e84a6ea19a0e"},{"ELEMENT":"81e0e4fc-9b85-4ee6-b53f-4eefc31e08d2"},{"ELEMENT":"cbe6d81d-cfe4-46e6-a485-40ccb4ae3924"},{"ELEMENT":"f71527aa-5b2f-42ee-a0f0-a59dfda8d917"}] | |
[HTTP] <-- POST /wd/hub/session/becff492-8612-4c28-8fc4-6fd00e54bb5c/elements 200 184 ms - 685 | |
[HTTP] --> GET /wd/hub/session/becff492-8612-4c28-8fc4-6fd00e54bb5c/element/e6ef3682-48b0-4375-8791-a5e8d19221bc/name {} | |
[debug] [MJSONWP] Calling AppiumDriver.getName() with args: ["e6ef3682-48b0-4375-8791-a5e8d19221bc","becff492-8612-4c28-8fc4-6fd00e54bb5c"] | |
[debug] [JSONWP Proxy] Proxying [GET /element/e6ef3682-48b0-4375-8791-a5e8d19221bc/name] to [GET http://localhost:8200/wd/hub/session/25a2817e-d08f-4b4f-888c-6efabf916be9/element/e6ef3682-48b0-4375-8791-a5e8d19221bc/name] with body: {} | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"25a2817e-d08f-4b4f-888c-6efabf916be9\",\"status\":0}" | |
[MJSONWP] Encountered internal error running command: Error: Did not get a valid response object. Object was: {"sessionId":"25a2817e-d08f-4b4f-888c-6efabf916be9","status":0} | |
at JWProxy.command$ (../../../lib/jsonwp-proxy/proxy.js:165:13) | |
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) | |
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) | |
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) | |
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) | |
at <anonymous> | |
[HTTP] <-- GET /wd/hub/session/becff492-8612-4c28-8fc4-6fd00e54bb5c/element/e6ef3682-48b0-4375-8791-a5e8d19221bc/name 500 29 ms - 289 | |
[HTTP] --> DELETE /wd/hub/session/becff492-8612-4c28-8fc4-6fd00e54bb5c {} | |
[debug] [MJSONWP] Calling AppiumDriver.deleteSession() with args: ["becff492-8612-4c28-8fc4-6fd00e54bb5c"] | |
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1499591640509 (17:14:00 GMT+0800 (CST)) | |
[debug] [UiAutomator2] Deleting UiAutomator2 session | |
[debug] [UiAutomator2] Deleting UiAutomator2 server session | |
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/25a2817e-d08f-4b4f-888c-6efabf916be9] with no body | |
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"25a2817e-d08f-4b4f-888c-6efabf916be9\",\"status\":0,\"value\":\"Session deleted\"}" | |
[debug] [ADB] Getting connected devices... | |
[debug] [ADB] 1 device(s) connected | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","shell","am","force-stop","io.appium.android.apis"] | |
[debug] [Logcat] Stopping logcat capture | |
[debug] [ADB] Removing forwarded port socket connection: 8200 | |
[debug] [ADB] Running '/usr/local/opt/android-sdk/platform-tools/adb' with args: ["-P",5037,"-s","3HX7N17115002555","forward","--remove","tcp:8200"] | |
[Appium] Removing session becff492-8612-4c28-8fc4-6fd00e54bb5c from our master session list | |
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1499591640933 (17:14:00 GMT+0800 (CST)) | |
[debug] [MJSONWP] Received response: null | |
[debug] [MJSONWP] But deleting session, so not returning | |
[debug] [MJSONWP] Responding to client with driver.deleteSession() result: null | |
[HTTP] <-- DELETE /wd/hub/session/becff492-8612-4c28-8fc4-6fd00e54bb5c 200 42 | |
the source code: | |
import os | |
import unittest | |
from appium import webdriver | |
from appium.webdriver.common.touch_action import TouchAction | |
from appium.webdriver.common.multi_action import MultiAction | |
from time import sleep | |
# Returns abs path relative to this file and not cwd | |
PATH = lambda p: os.path.abspath( | |
os.path.join(os.path.dirname(__file__), p) | |
) | |
class ComplexAndroidTests(unittest.TestCase): | |
def setUp(self): | |
desired_caps = {} | |
desired_caps['platformName'] = 'Android' | |
desired_caps['platformVersion'] = '7.0' | |
desired_caps['deviceName'] = '3HX7N17115002555' | |
desired_caps['automationName'] = 'uiautomator2' | |
desired_caps['app'] = PATH( | |
'../../../sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' | |
) | |
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) | |
def tearDown(self): | |
self.driver.quit() | |
def test_find_elements(self): | |
# pause a moment, so xml generation can occur | |
sleep(2) | |
els = self.driver.find_elements_by_xpath('//android.widget.TextView') | |
self.assertEqual('API Demos', els[0].text) | |
el = self.driver.find_element_by_xpath('//android.widget.TextView[contains(@text, "Animat")]') | |
self.assertEqual('Animation', el.text) | |
el = self.driver.find_element_by_accessibility_id("App") | |
el.click() | |
els = self.driver.find_elements_by_android_uiautomator('new UiSelector().clickable(true)') | |
# there are more, but at least 10 visible | |
self.assertLess(10, len(els)) | |
# the list includes 2 before the main visible elements | |
self.assertEqual('Action Bar', els[2].text) | |
els = self.driver.find_elements_by_xpath('//android.widget.TextView') | |
self.assertLess(10, len(els)) | |
self.assertEqual('Action Bar', els[1].text) | |
def test_scroll(self): | |
sleep(2) | |
els = self.driver.find_elements_by_xpath('//android.widget.TextView') | |
if len(els) > 0: | |
element = els[0] | |
print element.tag_name | |
if __name__ == '__main__': | |
suite = unittest.TestLoader().loadTestsFromTestCase(ComplexAndroidTests) | |
unittest.TextTestRunner(verbosity=2).run(suite) | |
and execute log is : | |
test_find_elements (__main__.ComplexAndroidTests) ... FAIL | |
test_scroll (__main__.ComplexAndroidTests) ... ERROR | |
====================================================================== | |
ERROR: test_scroll (__main__.ComplexAndroidTests) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Users/june/Desktop/sample-code-master/sample-code/examples/python/android_complex.py", line 59, in test_scroll | |
print element.tag_name | |
File "/Library/Python/2.7/site-packages/selenium-2.52.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 66, in tag_name | |
return self._execute(Command.GET_ELEMENT_TAG_NAME)['value'] | |
File "/Library/Python/2.7/site-packages/selenium-2.52.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 469, in _execute | |
return self._parent.execute(command, params) | |
File "/Library/Python/2.7/site-packages/selenium-2.52.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 201, in execute | |
self.error_handler.check_response(response) | |
File "build/bdist.macosx-10.11-intel/egg/appium/webdriver/errorhandler.py", line 29, in check_response | |
raise wde | |
WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Did not get a valid response object. Object was: {"sessionId":"25a2817e-d08f-4b4f-888c-6efabf916be9","status":0} | |
====================================================================== | |
FAIL: test_find_elements (__main__.ComplexAndroidTests) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Users/june/Desktop/sample-code-master/sample-code/examples/python/android_complex.py", line 48, in test_find_elements | |
self.assertEqual('Action Bar', els[2].text) | |
AssertionError: 'Action Bar' != u'Alarm' | |
---------------------------------------------------------------------- | |
Ran 2 tests in 24.751s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment