Skip to content

Commit

Permalink
Fixed an selenium step. It was being restricted to only use selenium …
Browse files Browse the repository at this point in the history
…locators
  • Loading branch information
jose.fernandez committed Jan 6, 2021
1 parent 2167820 commit 4621a11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/privalia/qa/specs/SeleniumGSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,15 @@ public void assertSeleniumIsSelected(Integer index, String option) {
* <pre>
* Example:
* {@code
* When '1' elements exists with 'id:phone_9'
* Then the element on index '0' has 'id' as 'phone_9'
* When '1' elements exists with 'id:loginButton'
* Then the element on index '0' has 'type' as 'submit'
* }
* </pre>
* @param index the index of the web element
* @param attribute the attribute to verify
* @param value the value of the attribute
*/
@Then("^the element on index '(\\d)' has '(" + LOCATORS + ")' as '(.*)'$")
@Then("^the element on index '(\\d)' has '(.*?)' as '(.*)'$")
public void assertSeleniumHasAttributeValue(Integer index, String attribute, String value) {
Assertions.assertThat(commonspec.getPreviousWebElements().getPreviousWebElements().size()).as("Could not get webelement with index %s. Less elements were found. Allowed index: 0 to %s", index, commonspec.getPreviousWebElements().getPreviousWebElements().size() - 1)
.isGreaterThanOrEqualTo(index + 1);
Expand Down

0 comments on commit 4621a11

Please sign in to comment.