web » waitWhileElementNotPresent(locator,waitMs)
Description
This command polls for an element to match the specified locator
until waitMs
millisecond. If the element is found
within waitMs
millisecond, then the corresponding step is considered as FAIL
. Note that this command will keep
polling for the presence of the target element until waitMs
milliseconds has passed.
This command can be useful when one desires to ensure that a certain element is not present. For example,
- after correcting and submitting the registration form, the “error message” section should no longer be present.
- after completing the outstanding payment, the “payment” icon should no longer be present.
Parameters
- locator - this parameter is the locator of the element.
- waitMs - the maximum amount of time to wait for said condition.