Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Appium implicit wait and display wait

Shulou Source: shulou.com Published: 2022-06-03 05:53:08 09月17日 Update

Https://github.com/appium/appium/blob/master/docs/en/commands/session/timeouts/implicit-wait.md

Death, etc.

Sleep (10)

Will wait for 10 seconds.

Implicit wait:

Set a timeout, during which the server (Appium) will constantly look for elements, and if the timeout cannot be found, it will report an error. It is global.

Driver.implicitly_wait (10) # 10 seconds

Driver.manage (). Timeouts (). ImplicitlyWait (6, TimeUnit.SECONDS)

Show wait:

Client (use case side), set a timeout and an element lookup condition, and keep looking for this element during this time. If the timeout cannot be found, an error will be reported.

WebDriverWait wait = new WebDriverWait (driver,10)

WebElement webElement = wait.until (ExpectedConditions.elementToBeClickable (By.id ("someid")

Summary:

Implicit waiting and display waiting are essentially the same.

Shows that there is an extra conditional timeout for waiting for the specified element

In usage scenarios, implicit waiting can be used for global control.

If a control is special and takes longer to load, such as more than ten seconds or more, it can be processed separately using display wait

Tags: Time element continuous global time condition report special consistent global scenario client client control essence processing control service Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux Redmi Microsoft MariaDB