-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[plugin-web-app-playwright] Add element wait steps (#5224)
- Loading branch information
Showing
10 changed files
with
425 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
docs/modules/plugins/partials/ui-wait-element-state-steps.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
=== Wait for element appearance | ||
|
||
Waits for appearance of the element by the locator. | ||
|
||
WARNING: It's forbidden to use <<_visibility_types>> in the locator. | ||
|
||
[source,gherkin] | ||
---- | ||
When I wait until element located by `$locator` appears | ||
---- | ||
|
||
* `$locator` - <<_locator>>. | ||
.Wait for appearance of the element with the specified name | ||
[source,gherkin] | ||
---- | ||
When I wait until element located by `id(welcome-image)` appears | ||
---- | ||
|
||
=== Wait for element disappearance | ||
|
||
Waits for disappearance of the element by the locator. | ||
|
||
NOTE: If the element doesn't exist on the page/context, the step will immediately complete successfully. | ||
Checking the element on the page (if needed) should be done in a separate step (e.g. <<_wait_for_element_appearance>> or xref:plugin-html.adoc#_validate_elements[Validate elements]). | ||
|
||
WARNING: It's forbidden to use <<_visibility_types>> in the locator. | ||
|
||
[source,gherkin] | ||
---- | ||
When I wait until element located by `$locator` disappears | ||
---- | ||
|
||
* `$locator` - <<_locator>>. | ||
|
||
.Wait for disappearance of the element with the specified name | ||
[source,gherkin] | ||
---- | ||
When I wait until element located by `id(welcome-image)` disappears | ||
---- | ||
|
||
=== Wait for element with specified state using polling interval | ||
|
||
Waits for an element with the specified state to be found using the specified timeout with polling interval. | ||
|
||
[source,gherkin] | ||
---- | ||
When I wait `$duration` with `$pollingDuration` polling until element located by `$locator` becomes $state | ||
---- | ||
|
||
* `$duration` - Total duration to wait in the {iso-date-format-link} format. | ||
* `$pollingDuration` - The duration to wait between search retries in the {iso-date-format-link} format. | ||
* `$locator` - The <<_locator,locator>> of the element to wait for state change. | ||
* `$state` - The element xref:parameters:state.adoc[state]. | ||
|
||
.Verify that the element become invisible up to 10 times | ||
[source,gherkin] | ||
---- | ||
When I wait `PT10S` with `PT1S` polling until element located by `id(element-to-hide)` becomes not visible | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.