模擬器和真機都一樣,登錄的時候不慢,就是登錄進去后每個元素執行都要8、9秒左右,本以為是xpath定位慢,但換個定位方法還是一樣!!我感覺是和appium互動有關系!我的環境是python3.5+appium1.7.1!以下是我的腳本和日志!(本人不會看日志,來大神解答!急求)

[HTTP] --> POST /wd/hub/session/45d30326-3591-4083-8256-1700b3cf9542/element {"value":"//*[@text='您還未系結設備,請先系結!']","using":"xpath","sessionId":"45d30326-3591-4083-8256-1700b3cf9542"}
[MJSONWP] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='您還未系結設備,請先系結!']","45d30326-3591-4083-8256-1700b3cf9542"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 10000 ms for condition
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您還未系結設備,請先系結!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您還未系結設備,請先系結!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@text='您還未系結設備,請先系結!']' using 'XPATH' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@text='您還未系結設備,請先系結!']' using 'XPATH' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":7,"value":"No element found"}
[AndroidBootstrap] Received command result from bootstrap
[BaseDriver] Waited for 137 ms so far
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您還未系結設備,請先系結!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您還未系結設備,請先系結!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@text='您還未系結設備,請先系結!']' using 'XPATH' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[CLASS=android.widget.TextView, INSTANCE=3]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":{"ELEMENT":"5"}}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"5"}
[HTTP] <-- POST /wd/hub/session/45d30326-3591-4083-8256-1700b3cf9542/element 200 10806 ms - 87
[HTTP] --> POST /wd/hub/session/45d30326-3591-4083-8256-
uj5u.com熱心網友回復:
樓主解決了嗎轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/267768.html
標籤:軟件測試
下一篇:Qt 中如何實作模糊查找?
