Dev::Coder 在電梯裡遇見雙胞胎
首頁 | 關於我 | 筆記 // 當你開始尋找,你就已經在前往的路上...
  1. 透過 npm 安裝 Appium

  2. 啟動 Appium server

    $ appium
    info: Welcome to Appium v0.10.1 (REV d0827d6b2507c982802d02b2c6d2bb4d6906bdb3)
    info: Appium REST http interface listener started on 0.0.0.0:4723
       info  - socket.io started
    
  3. 從 source 取得 example tests,這裡以 Python 為例。

    sample-code/examples/python/android.py
    import os
    from time import sleep
    
    from selenium import webdriver
    
    # Returns abs path relative to this file and not cwd
    PATH = lambda p: os.path.abspath(
        os.path.join(os.path.dirname(__file__), p)
    )
    
    desired_caps = {} # 1
    desired_caps['device'] = 'Android' # 4
    desired_caps['browserName'] = ''
    desired_caps['version'] = '4.2'
    desired_caps['app'] = PATH(
        '../../../sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk' # 2
    )
    desired_caps['app-package'] = 'com.example.android.apis'
    desired_caps['app-activity'] = '.ApiDemos'
    
    driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) # 3
    
    print driver.get_window_size()
    elem = driver.find_element_by_name('Graphics') # 5
    elem.click()
    elem = driver.find_element_by_name('Arcs')
    elem.click()
    driver.quit()
    
    1 除了 desired capabilities 之外,其實看不出來跟一般 Selenium 2/WebDriver 的測試有何不同…
    2 ApiDemos-debug.apk透過 source code 安裝才有的。
    3 透過 Remove WebDriverAppium server 溝通。
    4 如果要執行在 Android 4.1+ 以前的環境,則要改用 Selendroid Mode
    5 透過 find_element[s]*() 定位到要操作的對象(WebElement),就可以對它進行操作。
  4. 將 API 16+ 的 emulator 或實體機準備好。執行測試:

    $ python android.py
    {u'width': 1280, u'height': 720}

過程中 Appium server 會輸出:(假設 --prefix=~/local

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"app-package":"com.example.android.apis","app":"/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","browserName":"","version":"4.2","device":"Android","app-activity":".ApiDemos"}}
info: Using local app from desiredCaps: /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
info: Creating new appium session 256db461-8222-45f5-a16b-5173964f57a0
info: Starting android appium
debug: Using fast reset? true 1
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from ~/dev/android/platform-tools/adb
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
info: [ADB] 1 device(s) connected
info: [ADB] Setting device id to 4df10ad5566e8f05
info: Found device, no need to retry
info: [ADB] Waiting for device 4df10ad5566e8f05 to be ready and to respond to shell commands (timeout = 5)
info: Starting logcat capture
info: Checking whether we need to run fast reset
debug: APK doesn't exist. /tmp/com.example.android.apis.clean.apk
debug: Checking app cert for /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk: java -jar "~/local/lib/node_modules/appium/app/android/verify.jar" "/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"
debug: App not signed with debug cert.
debug: App signed? false /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
info: Building fast reset 2
info: Checking whether aapt is present
info: [ADB] Using aapt from ~/dev/android/build-tools/17.0.0/aapt
info: Compiling manifest /tmp/AndroidManifest.xml
debug: "~/dev/android/build-tools/17.0.0/aapt" package -M "/tmp/AndroidManifest.xml" --rename-manifest-package "com.example.android.apis.clean" --rename-instrumentation-target-package "com.example.android.apis" -I "~/dev/android/platforms/android-18/android.jar" -F "/tmp/AndroidManifest.xml.apk" -f
debug: Compiled manifest
info: Inserting manifest, src: ~/local/lib/node_modules/appium/app/android/Clean.apk, dst: /tmp/com.example.android.apis.clean.apk
debug: Extracting manifest
info: Unzipping /tmp/AndroidManifest.xml.apk
info: Testing zip archive: /tmp/AndroidManifest.xml.apk
info: Zip archive tested clean
info: Unzip successful
debug: Writing tmp apk. ~/local/lib/node_modules/appium/app/android/Clean.apk to /tmp/com.example.android.apis.clean.apk
debug: Testing new tmp apk.
info: Testing zip archive: /tmp/com.example.android.apis.clean.apk
info: Zip archive tested clean
debug: Moving manifest with: zip -j -m "/tmp/com.example.android.apis.clean.apk" "/tmp/AndroidManifest.xml"
debug: Inserted manifest.
debug: Signing app and clean apk. 2
debug: Resigning apks with: java -jar "~/local/lib/node_modules/appium/app/android/sign.jar" "/tmp/com.example.android.apis.clean.apk" "/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk" --override
debug: java -jar "~/local/lib/node_modules/appium/app/android/strings_from_apk.jar" "/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk" "/tmp/com.example.android.apis"
info: [ADB] Not uninstalling app since server not started with --full-reset 4
info: Determining app install/clean status
debug: Getting install/clean status for com.example.android.apis
debug: Running fast reset clean: "~/dev/android/platform-tools/adb" -s 4df10ad5566e8f05 shell am instrument com.example.android.apis.clean/clean.apk.Clean 3
info: [ADB] Installing app apk
info: Installing /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
debug:  pkg: /data/local/tmp/ApiDemos-debug.apk
Success

info: [ADB] Installing clean apk
info: Installing /tmp/com.example.android.apis.clean.apk
debug:  pkg: /data/local/tmp/com.example.android.apis.clean.apk
Success

info: [ADB] Forwarding system:4724 to device:4724
info: [ADB] Pushing appium bootstrap to device...
info: [ADB] Pushing unlock helper app to device...
info: Running bootstrap
info: "~/dev/android/platform-tools/adb" -s 4df10ad5566e8f05 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [ANDROID] [info] Socket opened on port 4724
info: [ADB] Connecting to server on device on port 4724...
info: [ANDROID] [info] Appium Socket Server Ready
info: [ANDROID] [info] Loading json...
info: [ADB] Connected!
info: [ADB] Waking up device if it's not alive
info: Pushing command to appium work queue: ["wake",{}]
info: [ADB] Sending command to android: {"cmd":"action","action":"wake","params":{}}
info: [ANDROID] [info] json loading complete.
info: [ANDROID] [info] Client connected
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: wake
info: [ANDROID] [info] Returning result: {"value":true,"status":0}
info: [ADB] Received command result from bootstrap
info: [ADB] Checking if screen is unlocked via `dumpsys window`...
info: [ADB] Screen already unlocked, continuing.
info: Starting app
info: [ADB] Starting app
"~/dev/android/platform-tools/adb" -s 4df10ad5566e8f05 shell am start -n com.example.android.apis/.ApiDemos 5
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: ADB launched! Ready for commands (will time out in 60secs)
info: Appium session started with sessionId 256db461-8222-45f5-a16b-5173964f57a0
POST /wd/hub/session 303 18867ms - 9
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0
info: Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","version":"4.1","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false},"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
GET /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0 200 23ms - 288
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/window/current/size
info: Pushing command to appium work queue: ["getDeviceSize"]
info: [ADB] Sending command to android: {"cmd":"action","action":"getDeviceSize","params":{}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"getDeviceSize","params":{}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: getDeviceSize
info: [ANDROID] [info] Returning result: {"value":{"width":720,"height":1280},"status":0}
info: [ADB] Received command result from bootstrap
info: Responding to client with success: {"status":0,"value":{"width":720,"height":1280},"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
GET /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/window/current/size 200 28ms - 127
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element
debug: Request received with params: {"using":"name","sessionId":"256db461-8222-45f5-a16b-5173964f57a0","value":"Graphics"}
info: Pushing command to appium work queue: ["find",{"strategy":"name","selector":"Graphics","context":"","multiple":false}]
info: [ADB] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Graphics","context":"","multiple":false}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Graphics","context":"","multiple":false}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: find
info: [ANDROID] [debug] Finding Graphics using NAME with the contextId:
info: [ANDROID] [info] Returning result: {"value":{"ELEMENT":"1"},"status":0}
info: [ADB] Received command result from bootstrap
info: Responding to client with success: {"status":0,"value":{"ELEMENT":"1"},"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
POST /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element 200 1011ms - 109
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element/1/click
debug: Request received with params: {"sessionId":"256db461-8222-45f5-a16b-5173964f57a0","id":"1"}
info: Pushing command to appium work queue: ["element:click",{"elementId":"1"}]
info: [ADB] Sending command to android: {"cmd":"action","action":"element:click","params":{"elementId":"1"}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"1"}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: click
info: [ANDROID] [info] Returning result: {"value":true,"status":0}
info: [ADB] Received command result from bootstrap
info: Responding to client with success: {"status":0,"value":true,"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
POST /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element/1/click 200 166ms - 89
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element
debug: Request received with params: {"using":"name","sessionId":"256db461-8222-45f5-a16b-5173964f57a0","value":"Arcs"}
info: Pushing command to appium work queue: ["find",{"strategy":"name","selector":"Arcs","context":"","multiple":false}]
info: [ADB] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Arcs","context":"","multiple":false}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"Arcs","context":"","multiple":false}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: find
info: [ANDROID] [debug] Finding Arcs using NAME with the contextId:
info: [ANDROID] [info] Returning result: {"value":{"ELEMENT":"2"},"status":0}
info: [ADB] Received command result from bootstrap
info: Responding to client with success: {"status":0,"value":{"ELEMENT":"2"},"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
POST /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element 200 1108ms - 109
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element/2/click
debug: Request received with params: {"sessionId":"256db461-8222-45f5-a16b-5173964f57a0","id":"2"}
info: Pushing command to appium work queue: ["element:click",{"elementId":"2"}]
info: [ADB] Sending command to android: {"cmd":"action","action":"element:click","params":{"elementId":"2"}}
info: [ANDROID] [info] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"2"}}
info: [ANDROID] [info] Got command of type ACTION
info: [ANDROID] [debug] Got command action: click
info: [ANDROID] [info] Returning result: {"value":true,"status":0}
info: [ADB] Received command result from bootstrap
info: Responding to client with success: {"status":0,"value":true,"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
POST /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0/element/2/click 200 168ms - 89
debug: Appium request initiated at /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0
info: Shutting down appium session...
info: [ADB] Pressing the HOME button
info: [ADB] Sending command to android: {"cmd":"shutdown"}
info: Stopping logcat capture
info: [ANDROID] [info] Got data from client: {"cmd":"shutdown"}
info: [ANDROID] [info] Got command of type SHUTDOWN
info: [ANDROID] [info] Returning result: {"value":"OK, shutting down","status":0}
info: [ADB] Received command result from bootstrap
info: Sent shutdown command, waiting for ADB to stop...
info: [ANDROID] [info] Closed client connection
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [ADB STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [ADB STDOUT] INSTRUMENTATION_STATUS: stream=
info: [ADB STDOUT] Test results for UiAutomatorTestRunner=.
info: [ADB STDOUT] Time: 4.804
info: [ADB STDOUT] OK (1 test)
info: [ADB STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [ADB] Not uninstalling app since server not started with --full-reset 4
info: Clearing out appium devices
info: Responding to client with success: {"status":0,"value":null,"sessionId":"256db461-8222-45f5-a16b-5173964f57a0"}
DELETE /wd/hub/session/256db461-8222-45f5-a16b-5173964f57a0 200 1001ms - 89
1 Appium 預設採用 fast reset,如果啟動 Appium server 時有加 --full-reset--no-reset,這裡就會是 false
2 事先將 SUT 的 .apkclean.apk 都用 debug key 做 sign 的動作,接下來如果判定需要清 app data 時,clean.apk 才能清掉資料。
3 "Running fast reset clean:" 這一行只有真正需要透過 clean.apk 來清 app data 時才會出現,但有時好像誤判??
4 顯然 --full-reset 會在 session 開始跟結束時,各執行一次移除 app 的動作,確保不同的測試之間不會相互干擾。
5 內部透過 activity manager 直接叫出 desired capabilities 裡指定的 launcher activity

簡單改寫一下 android.py,就可以讓相同的測試跑在 API 16+ 以前的設備上:

sample-code/examples/python/android.py
import os
from time import sleep

from selenium import webdriver

# Returns abs path relative to this file and not cwd
PATH = lambda p: os.path.abspath(
    os.path.join(os.path.dirname(__file__), p)
)

desired_caps = {}
desired_caps['device'] = 'selendroid' # 1
#desired_caps['browserName'] = ''     # 2
#desired_caps['version'] = '4.2'
desired_caps['app'] = PATH(
    '../../../sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk'
)
desired_caps['app-package'] = 'com.example.android.apis'
desired_caps['app-activity'] = '.ApiDemos'

driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

#print driver.get_window_size() 3
elem = driver.find_element_by_name('Graphics')
elem.click()
elem = driver.find_element_by_name('Arcs')
elem.click()
driver.quit()
1 改用 Selendroid Mode
2 browserNameversion 其實都是不必要的。
3 執行期會丟出 java.lang.NoSuchMethodError,顯然 get_window_size() 不被 Selendroid Mode 支援??

過程中 Appium server 會輸出:

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"app-package":"com.example.android.apis","app":"/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","browserName":"","version":"4.2","device":"selendroid","app-activity":".ApiDemos"}}
info: Using local app from desiredCaps: /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
info: Creating new appium session 324fb9c0-131b-427b-93db-2d568aaecab1
info: Starting selendroid server
info: Checking whether selendroid is built yet
info: Selendroid server exists!
info: Starting selendroid
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from ~/dev/android/platform-tools/adb
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
info: [ADB] 1 device(s) connected
info: [ADB] Setting device id to HT142TJ06210
info: Found device, no need to retry
info: [ADB] Waiting for device HT142TJ06210 to be ready and to respond to shell commands (timeout = 5)
info: Starting logcat capture
info: Checking whether we need to run fast reset
info: User doesn't want fast reset, doing nothing
info: Rebuilt selendroid apk exists, doing nothing
info: Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
info: Checking signed status of /tmp/selendroid.com.example.android.apis.apk
debug: Checking app cert for /tmp/selendroid.com.example.android.apis.apk: java -jar "~/local/lib/node_modules/appium/app/android/verify.jar" "/tmp/selendroid.com.example.android.apis.apk"
info: Checking signed status of /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
debug: Checking app cert for /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk: java -jar "~/local/lib/node_modules/appium/app/android/verify.jar" "/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk"
debug: App already signed.
debug: App already signed.
debug: Getting install/clean status for com.example.android.apis.selendroid
info: Rebuilt selendroid is not installed, installing it
info: Installing /tmp/selendroid.com.example.android.apis.apk
debug:  pkg: /data/local/tmp/selendroid.com.example.android.apis.apk
Success

info: Determining app install/clean status
debug: Getting install/clean status for com.example.android.apis
info: [ADB] Installing app apk
info: Installing /tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk
debug:  pkg: /data/local/tmp/ApiDemos-debug.apk
Success

info: [ADB] Forwarding system:8080 to device:8080
info: [ADB] Pushing unlock helper app to device...
info: [ADB] Checking if screen is unlocked via `dumpsys window`...
info: [ADB] Screen already unlocked, continuing.
info: Starting instrumentation process for selendroid with cmd: "~/dev/android/platform-tools/adb" -s HT142TJ06210 shell am instrument -e main_activity 'com.example.android.apis.ApiDemos' com.example.android.apis.selendroid/io.selendroid.ServerInstrumentation
info: Selendroid server is launching
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Selendroid server is alive!
info: Creating Selendroid session
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session","method":"POST","json":{"desiredCapabilities":{"app-package":"com.example.android.apis","app":"/tmp/appium/sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk","browserName":"","version":"4.2","device":"selendroid","app-activity":".ApiDemos"}}}
info: Successfully started selendroid session
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: Overriding session id with bef88ce6-19cb-4995-9e8a-8ce65a53963d
info: Appium session started with sessionId bef88ce6-19cb-4995-9e8a-8ce65a53963d
POST /wd/hub/session 303 38558ms - 9
debug: Appium request initiated at /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d
debug: Proxying command to localhost:8080
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d","method":"GET"}
debug: Proxied response received with status 200: "{\"value\":{\"platform\":\"android\",\"acceptSslCerts\":true,\"javascriptEnabled\":true,\"handlesAlerts\":false,\"browserName\":\"selendroid\",\"rotatable\":false,\"takesScreenshot\":true,\"version\":\"0.6.0-SNAPSHOT\"},\"status\":0,\"sessionId\":\"bef88ce6-19cb-4995-9e8a-8ce65a53963d\"}"
GET /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d 200 51ms - 258
debug: Appium request initiated at /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element
debug: Request received with params: {"using":"name","sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","value":"Graphics"}
debug: Proxying command to localhost:8080
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element","method":"POST","json":{"using":"name","sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","value":"Graphics"}}
debug: Proxied response received with status 200: {"value":{"ELEMENT":"b0f40700-2ae7-4172-b165-fa8ee17eacf2"},"status":0,"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d"}
POST /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element 200 75ms - 144
debug: Appium request initiated at /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element/b0f40700-2ae7-4172-b165-fa8ee17eacf2/click
debug: Request received with params: {"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","id":"b0f40700-2ae7-4172-b165-fa8ee17eacf2"}
debug: Proxying command to localhost:8080
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element/b0f40700-2ae7-4172-b165-fa8ee17eacf2/click","method":"POST","json":{"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","id":"b0f40700-2ae7-4172-b165-fa8ee17eacf2"}}
debug: Proxied response received with status 200: {"value":"","status":0,"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d"}
POST /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element/b0f40700-2ae7-4172-b165-fa8ee17eacf2/click 200 908ms - 87
debug: Appium request initiated at /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element
debug: Request received with params: {"using":"name","sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","value":"Arcs"}
debug: Proxying command to localhost:8080
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element","method":"POST","json":{"using":"name","sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","value":"Arcs"}}
debug: Proxied response received with status 200: {"value":{"ELEMENT":"4bd21c88-6507-4fd1-b5c5-f92fe12ab2c7"},"status":0,"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d"}
POST /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element 200 389ms - 144
debug: Appium request initiated at /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element/4bd21c88-6507-4fd1-b5c5-f92fe12ab2c7/click
debug: Request received with params: {"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","id":"4bd21c88-6507-4fd1-b5c5-f92fe12ab2c7"}
debug: Proxying command to localhost:8080
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element/4bd21c88-6507-4fd1-b5c5-f92fe12ab2c7/click","method":"POST","json":{"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d","id":"4bd21c88-6507-4fd1-b5c5-f92fe12ab2c7"}}
debug: Proxied response received with status 200: {"value":"","status":0,"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d"}
POST /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d/element/4bd21c88-6507-4fd1-b5c5-f92fe12ab2c7/click 200 670ms - 87
debug: Appium request initiated at /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d
info: Shutting down appium session...
info: Stopping selendroid server
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d","method":"DELETE"}
info: Killing app
info: Clearing out appium devices
info: Responding to client with success: {"status":0,"value":null,"sessionId":"bef88ce6-19cb-4995-9e8a-8ce65a53963d"}
DELETE /wd/hub/session/bef88ce6-19cb-4995-9e8a-8ce65a53963d 200 830ms - 89

覺得這份文件有幫助?別忘了按個讚並分享給更多的人、留下你/您的意見...

comments powered by Disqus