pycharm中的报错信息
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.
D:\python3.7\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: NoSuchElementException
Assertion failed
Assertion failed
appium日志信息:
send_key"阿里巴巴"信息
[HTTP] --> POST /wd/hub/session/5683ff3c-1b4b-4ef3-803b-04dd415b12da/element/2/value
[HTTP] {"text":"阿里巴巴","value":["阿","里","巴","巴"],"id":"2"}
[W3C (5683ff3c)] Calling AppiumDriver.setValue() with args: [["阿","里","巴","巴"],"2","5683ff3c-1b4b-4ef3-803b-04dd415b12da"]
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"element:setText","params":{"elementId":"2","text":"阿里巴巴","replace":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"2","text":"阿里巴巴","replace":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: setText
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using element passed in: 2
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Attempting to clear using UiObject.clearText().
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Text remains after clearing, but it appears to be hint text.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Text not cleared. Assuming remainder is hint text.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Sending plain text to element: 阿里巴巴
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":true}
[AndroidBootstrap] Received command result from bootstrap
[W3C (5683ff3c)] Responding to client with driver.setValue() result: true
查找搜索结果页“阿里巴巴”日志信息
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@resource-id = 'com.xueqiu.android:id/name' and @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 '//*[@resource-id = 'com.xueqiu.android:id/name' and @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
[MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
[W3C (5683ff3c)] Encountered internal error running command: NoSuchElementError: An element could not be located on the page using the given search parameters.
[W3C (5683ff3c)] at AndroidDriver.helpers.findElOrEls (D:\appium2\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\commands\find.js:75:11)
[W3C (5683ff3c)] at process._tickCallback (internal/process/next_tick.js:68:7)
[HTTP] <-- POST /wd/hub/session/5683ff3c-1b4b-4ef3-803b-04dd415b12da/element 404 5064 ms -