-
-
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] Add step to save size and coordinates of an element (#…
- Loading branch information
Showing
14 changed files
with
268 additions
and
16 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
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
42 changes: 42 additions & 0 deletions
42
docs/modules/plugins/partials/ui-size-and-coordinates-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,42 @@ | ||
=== Save size and coordinates of element | ||
|
||
Saves the information about the size of an element and its coordinates relative to the viewport. | ||
|
||
[source,gherkin] | ||
---- | ||
When I save coordinates and size of element located by `$locator` to $scopes variable `$variableName` | ||
---- | ||
|
||
* `$locator` - <<_locator>>. | ||
* `$scopes` - xref:commons:variables.adoc#_scopes[The comma-separated set of the variables scopes]. | ||
* `$variableName` - The name of the variable to save the coordinates and size of an element which can be accessed on the variable name using dot notation (please see examples section): | ||
+ | ||
[cols="1,3", options="header"] | ||
|=== | ||
|Attribute | ||
|Description | ||
|
||
|`x` | ||
|the `x` coordinate | ||
|
||
|`y` | ||
|the `y` coordinate | ||
|
||
|`height` | ||
|the `height` of the element | ||
|
||
|`width` | ||
|the `width` of the element | ||
|
||
|=== | ||
|
||
.Verify image size and coordinates | ||
[source,gherkin] | ||
---- | ||
When I save coordinates and size of element located by `tagName(img)` to scenario variable `rect` | ||
Then `${rect.height}` is equal `400` | ||
Then `${rect.width}` is equal `400` | ||
Then `${rect.x}` is equal `200` | ||
Then `${rect.y}` is equal `8` | ||
---- |
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
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
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.