Skip to content

Commit

Permalink
Added the getAriaLabel() and getRole() methods to the WebElementFacade
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Mar 18, 2024
1 parent cbf3da5 commit b0f9840
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public interface WebElementFacade extends WebElement, WrapsElement, WebElementSt

String getTextContent();

String getAriaLabel();

String getRole();

boolean isDisabled();

<T extends WebElementFacade> T waitUntilEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,16 @@ public String getTextContent() {
return getElement().getAttribute("textContent");
}

@Override
public String getAriaLabel() {
return getAttribute("aria-label");
}

@Override
public String getRole() {
return getAttribute("role");
}

@Override
public boolean isDisabled() {
if (driverIsDisabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,16 @@ public String getTextContent() {
return "";
}

@Override
public String getAriaLabel() {
return "";
}

@Override
public String getRole() {
return "";
}

@Override
public boolean isDisabled() {
return false;
Expand Down

0 comments on commit b0f9840

Please sign in to comment.