Skip to content

Commit

Permalink
[plugin-web-app] Replace elementName locator with name locator (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
valfirst authored Aug 12, 2024
1 parent 9d61286 commit 6a2e714
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/modules/plugins/pages/plugin-web-app-playwright.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ By. prefix is optional.
|`name`
|Locate elements where any attribute or text value matches the specified search value. This locator is translated to `xpath(.//\*[@*='<elementName>' or text()='<elementName>'])`
locator.
|elementName(OK)
|name(OK)

|===

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ When I execute sequence of actions:

Composite: Then an element with the name '$elementName' containing text '$text' exists
Priority: 1
Then number of elements found by `elementName(<elementName>)->filter.textPart(<text>)` is equal to `1`
Then number of elements found by `name(<elementName>)->filter.textPart(<text>)` is equal to `1`

Composite: Then an element with the name '$elementName' and text '$text' exists
Then number of elements found by `elementName(<elementName>)->filter.caseSensitiveText(<text>)` is equal to `1`
Then number of elements found by `name(<elementName>)->filter.caseSensitiveText(<text>)` is equal to `1`

Composite: Then a [$state] element with the name '$elementName' and text '$text' exists
Priority: 1
!-- DEPRECATED: 0.7.0, Then number of elements found by `elementName(%2$s)->filter.caseSensitiveText(%3$s).state(%1$s)` is equal to `1`
Then number of elements found by `elementName(<elementName>)->filter.caseSensitiveText(<text>).state(<state>)` is equal to `1`
!-- DEPRECATED: 0.7.0, Then number of elements found by `name(%2$s)->filter.caseSensitiveText(%3$s).state(%1$s)` is equal to `1`
Then number of elements found by `name(<elementName>)->filter.caseSensitiveText(<text>).state(<state>)` is equal to `1`

Composite: Then an element with the name '$elementName' exists
Then number of elements found by `elementName(<elementName>)` is equal to `1`
Then number of elements found by `name(<elementName>)` is equal to `1`

Composite: Then an element with the name '$elementName' does not exist
Then number of elements found by `elementName(<elementName>)` is equal to `0`
Then number of elements found by `name(<elementName>)` is equal to `0`

Composite: Then a [$state] element with the name '$elementName' exists
!-- DEPRECATED: 0.7.0, Then number of elements found by `elementName(%2$s)->filter.state(%1$s)` is equal to `1`
Then number of elements found by `elementName(<elementName>)->filter.state(<state>)` is equal to `1`
!-- DEPRECATED: 0.7.0, Then number of elements found by `name(%2$s)->filter.state(%1$s)` is equal to `1`
Then number of elements found by `name(<elementName>)->filter.state(<state>)` is equal to `1`

Composite: Then an element with the tag '$elementTag' and text '$text' exists
Then number of elements found by `tagName(<elementTag>)->filter.caseSensitiveText(<text>)` is equal to `1`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Then `${browser-window-width}` is = `600`
Scenario: Verify `context-source-code` dynamic variable
When I reset context
Then `${context-source-code}` matches `^<html><head>.+`
When I change context to element located by `elementName(vividus-logo)`
When I change context to element located by `name(vividus-logo)`
Then `${context-source-code}` matches `^<img name.+`
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ Then the context element has a width of '13'% relative to the parent element
Scenario: Deprecated step verification When I perform right click on an element located `$locator`
Given I am on page with URL `${vividus-test-site-url}/mouseEvents.html`
Then number of elements found by `elementName(Foo)` is = `1`
Then number of elements found by `elementName(Bar)` is = `0`
Then number of elements found by `name(Bar)` is = `0`
When I perform right click on element located `id(context-menu)`
Then number of elements found by `elementName(Foo)` is = `0`
Then number of elements found by `elementName(Bar)` is = `1`
Then number of elements found by `name(Foo)` is = `0`
Then number of elements found by `name(Bar)` is = `1`

Scenario: Step verification When I perform right-click on an element located by `$locator`
Given I am on page with URL `${vividus-test-site-url}/mouseEvents.html`
Then number of elements found by `elementName(Foo)` is = `1`
Then number of elements found by `elementName(Bar)` is = `0`
Then number of elements found by `name(Foo)` is = `1`
Then number of elements found by `name(Bar)` is = `0`
When I perform right-click on element located by `id(context-menu)`
Then number of elements found by `elementName(Foo)` is = `0`
Then number of elements found by `elementName(Bar)` is = `1`
Then number of elements found by `name(Foo)` is = `0`
Then number of elements found by `name(Bar)` is = `1`

Scenario: Deprecated step verification Then the context element has the CSS property '$cssName'='$cssValue'
Given I am on page with URL `${vividus-test-site-url}/inputs.html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Meta:

Scenario: Healthcheck
Given I am on page with URL `${vividus-test-site-url}`
Then number of elements found by `elementName(vividus-logo)` is = `1`
Then number of elements found by `name(vividus-logo)` is = `1`

0 comments on commit 6a2e714

Please sign in to comment.