Appium 1.3.4
Here is the method that invokes the wait object:
public static Boolean waitForElementNotVisible(By by, AppiumDriver driver, int seconds) {
WebDriverWait wait = new WebDriverWait(driver, seconds);
Boolean elementIsNotVisible = true;
try {
elementIsNotVisible = wait.until(ExpectedConditions.invisibilityOfElementLocated(by));
} catch (WebDriverException e) {
elementIsNotVisible=false;
}
return elementIsNotVisible;
}
When I pass in, say 5 seconds as the explicit Wait timeout argument, it will still wait for the default 30 seconds.
Console snippet:
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding com.xxx.android.rentals:id/progress using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.xxx.android.rentals:id/progress]
info: [debug] Waited for 28477ms so far
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“No element found”,“status”:7}
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“id”,“selector”:“com.xxx.android.rentals:id/progress”,“context”:"",“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.xxx.android.rentals:id/progress”,“context”:"",“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding com.xxx.android.rentals:id/progress using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.xxx.android.rentals:id/progress]
info: [debug] Waited for 29479ms so far
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“No element found”,“status”:7}
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“id”,“selector”:“com.xxx.android.rentals:id/progress”,“context”:"",“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“id”,“selector”:“com.xxx.android.rentals:id/progress”,“context”:"",“multiple”:false}}