Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting implicit_wait does not seem to work #1087

Open
rafutek opened this issue Jan 23, 2025 · 0 comments
Open

Setting implicit_wait does not seem to work #1087

rafutek opened this issue Jan 23, 2025 · 0 comments

Comments

@rafutek
Copy link

rafutek commented Jan 23, 2025

Hello,

I started to use appium-python-client recently to do some Windows testing, so I am using this client locally, sending requests to Appium server running on a Windows machine.

I am facing an issue, implicit waits do not seem to work, because find_element fails with a NoSuchElementError at first try, like this :

[2387d715][WindowsDriver@4825] Proxying [POST /element] to [POST http://127.0.0.1:4724/wd/hub/session/009CBA1D-F495-48BD-A9E4-1BC061681C57/element] with body: {"using":"xpath","value":"//Window[@Name='Panneau de configuration']"}
[2387d715][WindowsDriver@4825] ==========================================
POST /wd/hub/session/009CBA1D-F495-48BD-A9E4-1BC061681C57/element HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, compress, deflate, br
Connection: keep-alive
Content-Length: 70
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4724
User-Agent: appium
{"using":"xpath","value":"//Window[@Name='Panneau de configuration']"}
[2387d715][WindowsDriver@4825] HTTP/1.1 404 Not Found
Content-Length: 139
Content-Type: application/json
{"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}}
[2387d715][WindowsDriver@4825] Got response with status 404: {"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}}
[2387d715][W3C] Matched W3C error code 'no such element' to NoSuchElementError
[2387d715][WindowsDriver@4825] Encountered internal error running command: NoSuchElementError: An element could not be located on the page using the given search parameters.
    at errorFromW3CJsonCode (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1110:25)
    at ProxyRequestError.getActualError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:979:14)
    at WADProxy.command (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\jsonwp-proxy\proxy.js:348:19)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at WinAppDriver.sendCommand (C:\Users\user\.appium\node_modules\appium-windows-driver\lib\winappdriver.js:251:12)
    at WindowsDriver.findElOrEls (C:\Users\user\.appium\node_modules\appium-windows-driver\lib\commands\find.js:11:10)
    at WindowsDriver.findElOrElsWithProcessing (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\basedriver\commands\find.ts:60:12)
    at WindowsDriver.findElement (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\basedriver\commands\find.ts:75:12)
[2387d715][HTTP] <-- POST /session/2387d715-1935-4d79-b88f-9bf9347e28ee/element 404 643 ms - 1459
[2387d715][HTTP] --> DELETE /session/2387d715-1935-4d79-b88f-9bf9347e28ee {}

I was expecting the function find_element to retry until implicit_wait timeout (30s) exceeded, but maybe am I missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant