Is there an existing issue for this?
Current Behavior
Sometimes webdriver.Remote will hang, and it will timeout at any point.
The same goes for using find_elements, if WDA crashes/hangs, then it will never timeout.
I've tried setting appium:newCommandTimeout to 5, but it will still just hang forever.
The only thing I've found that worked, was sitting driver.command_executor.keep_alive = False and driver.command_executor.set_timeout(5).
It's quite unclear, what the best/correct way, is to set a timeout for "anything" so that it cannot just hang indefinitely.
Expected Behavior
That it would timeout after 5 seconds, and there would be a clear documented way of doing this.
Minimal Reproducible Example
from appium import webdriver
from appium.webdriver.common.appiumby import AppiumBy
ios_caps = {
"appium:automationName": "XCUITest",
"platformName": "iOS",
"appium:udid": "00008020-001655400E82002E",
"appium:webDriverAgentUrl": "http://localhost:7777",
"appium:newCommandTimeout": 5,
}
driver = webdriver.Remote("http://127.0.0.1:4723", ios_caps)
driver.command_executor.set_timeout(5)
driver.find_elements(by=AppiumBy.IOS_PREDICATE, value="type LIKE '**'")
The find_elements in a slow app (ie. TikTok) will never return.
Environment
- Operating system:
- If running via
appium CLI...
- Appium CLI version (output of
appium --version): 2.0.0-beta.58
- Node.js version (output of
node --version): v18.12.1
npm version (output of npm --version): 8.19.2
- Last
appium version which did not exhibit the problem: ?
- If running Appium Desktop, its version:
- Appium driver(s) and their version(s): - xcuitest@4.21.1 [installed (npm)]
- Appium plugin(s) and their version(s): go-ios (gist attached later)
- Platform and version under test: iOS 16.4.1
- Real device or emulator/simulator: real device
Link to Appium Logs
No response
Futher Information
No response
Is there an existing issue for this?
Current Behavior
Sometimes
webdriver.Remotewill hang, and it will timeout at any point.The same goes for using
find_elements, if WDA crashes/hangs, then it will never timeout.I've tried setting
appium:newCommandTimeoutto 5, but it will still just hang forever.The only thing I've found that worked, was sitting
driver.command_executor.keep_alive = Falseanddriver.command_executor.set_timeout(5).It's quite unclear, what the best/correct way, is to set a timeout for "anything" so that it cannot just hang indefinitely.
Expected Behavior
That it would timeout after 5 seconds, and there would be a clear documented way of doing this.
Minimal Reproducible Example
The find_elements in a slow app (ie. TikTok) will never return.
Environment
appiumCLI...appium --version): 2.0.0-beta.58node --version): v18.12.1npmversion (output ofnpm --version): 8.19.2appiumversion which did not exhibit the problem: ?Link to Appium Logs
No response
Futher Information
No response