Skip to content

Instantly share code, notes, and snippets.

View dpgraham's full-sized avatar

Dan Graham dpgraham

  • Sauce Labs (@appium Team)
  • Vancouver, BC, Canada
View GitHub Profile
@dpgraham
dpgraham / gist:63a97e960dc3e16b68084428b877be9e
Created November 2, 2016 18:10
WebDriverAgent sample source data
{
"value": {
"tree": {
"isEnabled": "1",
"isVisible": "1",
"frame": "{{0, 0}, {375, 667}}",
"children": [
{
"isEnabled": "1",
"isVisible": "0",
{
"id": "80fc6c94-b9f3-88af-f805-01eb5e4c0e37",
"name": "Appium Android",
"description": "",
"order": [
"1a0981f4-ddf0-24b5-8b1a-9adf7a8414d8"
],
"folders": [],
"timestamp": 1478721413310,
"owner": 0,
[Appium] Welcome to Appium v1.6.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"","appium-version":"1.6","platformName":"Android","platformVersion":"6.0","deviceName":"Android","app":"com.android.chrome","newCommandTimeout":0}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"","appium-...
[Appium] Creating new AndroidDriver session
[Appium] Capabilities:
[Appium] browserName: ''
[Appium] appium-version: '1.6'
[Appium] platformName: 'Android'
[Appium] platformVersion: '6.0'
```xml
<?xml version="1.0" encoding="UTF-8"?>
<hierarchy rotation="0">
<node index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.eg.android.AlipayGphone" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1440,2392]">
<node index="0" text="" resource-id="" class="android.widget.LinearLayout" package="com.eg.android.AlipayGphone" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][1440,2392]">
<node index="0" text="" resource-id="android:id/content" class="android.widget.FrameLayout" package="com.eg.android.AlipayGphone" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long
[MJSONWP] Responding to client with driver.getPageSource() result: "\n\n \n \n \n \n
[HTTP] <-- GET /wd/hub/session/b8f207cc-33cf-43b5-8dab-b20c3014b8ac/source 200 499 ms - 21029
[HTTP] --> GET /wd/hub/session/b8f207cc-33cf-43b5-8dab-b20c3014b8ac/screenshot {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[XCUITest] Executing command 'proxyReqRes'
[JSONWP Proxy] Proxying [GET /wd/hub/session/b8f207cc-33cf-43b5-8dab-b20c3014b8ac/screenshot] to [GET http://localhost:8100/session/BB0F7F5A-51FF-41CF-AC9E-D6DCBDA1A3E7/screenshot] with body: {}
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : \"iVBORw0KGgoAAAANSUhEUgAAAoAAAARwCAYAAAB6j+UAAAAAAXNSR0IArs4c6QAA\\r\\nABxpRE9UAAAAAgAAAAAAAAI4AAAAKAAAAjgAAAI4AADUaX2EAdMAAEAASURBVHgB\\r\\n7J0FuNw29vbLzMzMzMzMW+6WmTFlTpmZYcvMzJxC0jZtykmTcpM01KYpw+5fX37e\\r\\n73hlj+zxwJ2Ze+fV88y1ry04enVsvTo6ksf4888\\/nX7CQDogHZAOSAekA9IB6UD7\\r\\n6MAYauz2aWy1tdpaOiAdkA5IB6QD0gF0QARQFlBZgKUD0gHpgHRAOiAd
[1] [debug] [MJSONWP] Calling AppiumDriver.findElement() with args: ["xpath","//*[1]//*[1]//*[1]//*[2]//*[1]//*[1]//*[11]","b5228c9c-3ee6-4538-a26e-b795ec34e98a"]
[1] [debug] [XCUITest] Executing command 'findElement'
[1] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, accessibility id
[1] [debug] [BaseDriver] Waiting up to 0 ms for condition
[1] [debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/543C14E0-B745-4533-BD63-958DF8A63A09/element] with body: {"using":"xpath","value":"//*[1]//*[1]//*[1]//*[2]//*[1]//*[1]//*[11]"}
[1] [debug] [JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"4EC232A1-1B43-4B50-85A6-163EE5285B29","type":"XCUIElementTypeCell","label":null},"sessionId":"543C14E0-B745-4533-BD63-958DF8A63A09","status":0}
[1] [debug] [MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"4EC232A1-1B43-4B50-85A6-163EE5285B29","type":"XCUIElementTypeCell","label":null}
C:\selenium\client>client-nexus5x-no-hub.bat
C:\selenium\client>appium --address localhost --port 9001 --bootstrap-port 9101 --local-timezone --platform-name Android --platform-version 25 --autom
ation-name uiautomator2 --log-no-color --udid 01097a726c732bd8
[Appium] Welcome to Appium v1.6.3
[Appium] Non-default server args:
[Appium] address: 'localhost'
[Appium] port: 9001
[Appium] bootstrapPort: 9101
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"appPackage":"com.package.tc","app":"/Users/Mithun/Documents/workspace/test.apk","noReset":true,"version":"","deviceName":"My Device","fullReset":false,"platform":"ANDROID","appActivity":"com.testlogin.controller.LoginActivity","newCommandTimeout":30000,"automationName":"appium","browserName":"android","platformName":"Android"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appPackage":"com.package.tc","app":"/Users/Mithun/Documents/workspace/TCAutomation_Android/apps/test.apk","noReset":true,"version":"","deviceName":"Mi Device","fullReset":false,"platform":"ANDROID","appActivity":"com.package.tc.login.controller.LoginActivity","newCommandTimeout":30000,"automationName":"appium","browserName":"android","platformName":"Android"},null,null,null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1489764246711 (20:54:06 GMT+0530 (IST))
[Appium] Creating new AndroidDriver (v1.13.0) session
[Appium] Capabilities:
[Appium]
[Appium] Creating new XCUITestDriver (v2.20.0) session
[Appium] Capabilities:
[Appium] app: 'Users/Kalidas/Desktop/Payload/Express.app'
[Appium] automationName: 'XCUITest'
[Appium] deviceName: 'iPhone 6s'
[Appium] noReset: true
[Appium] platformName: 'iOS'
[Appium] platformVersion: '10.2'
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[Appium] Welcome to Appium v1.6.4-beta (REV e4c6e4a5d800dad81164bc08b50d75617c229e50)
[Appium] Non-default server args:
[Appium] port: 4333
[Appium] Appium REST http interface listener started on 0.0.0.0:4333
[HTTP] --> POST /wd/hub/session {"capabilities":[{"desiredCapabilities":{"app":"/Users/nts/Desktop/NETAS/Setups/ipas/MTOSApp.ipa","realDeviceLogger":"/usr/local/lib/node_modules/deviceconsole/deviceconsole","platformVersion":"10.0","automationName":"XCUITest","browserName":"","udid":"d01c71e5bff18e022248d8e5e218c6bc0bbbfbba","platformName":"iOS","deviceName":"Tolga's IPhone","fullReset":false,"autoAcceptAlerts":true}},{"requiredCapabilities":{}}],"desiredCapabilities":{"app":"/Users/nts/Desktop/NETAS/Setups/ipas/MTOSApp.ipa","realDeviceLogger":"/usr/local/lib/node_modules/deviceconsole/deviceconsole","platformVersion":"10.0","automationName":"XCUITest","browserName":"","udid":"d01c71e5bff18e022248d8e5e218c6bc0bbbfbba","platformName":"iOS","deviceName":"Tolga's IPhone","fullReset":false,"autoAcceptAlert