Skip to content

Commit

Permalink
Added simplified type method without checks
Browse files Browse the repository at this point in the history
  • Loading branch information
martingrossmann committed Aug 16, 2024
1 parent f7ce126 commit 59d4d93
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,27 @@ public void contextClick() {
// });
// }

/**
* This is only a simple method without re-checks (see Testerra eu.tsystems.mms.tic.testframework.pageobjects.internal.core.AbstractWebDriverCore.type()).
* <p>
* Android apps does not support 'webElement.getAttribute("value")', 'webElement.getText()' and 'webElement.getAttribute("value")' have always empty results at Chrome and Safari
*/
@Override
public void type(String text) {
if (text == null) {
log().warn("Text to type is null. Typing nothing.");
return;
}
if (text.isEmpty()) {
log().warn("Text to type is empty!");
}

findWebElement(webElement -> {
webElement.clear();
webElement.sendKeys(text);
});
}

@Override
public void swipe(int offsetX, int offsetY) {
new AppiumUtils().swipe(this.guiElementData.getGuiElement(), new Point(offsetX, offsetY));
Expand Down

0 comments on commit 59d4d93

Please sign in to comment.