Skip to content

Commit

Permalink
POSHI-30 Revert 0161d8d^..3d36d7b
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjiheigel authored and brianchandotcom committed Mar 23, 2020
1 parent b6a709a commit 350e0a1
Showing 1 changed file with 2 additions and 28 deletions.
Expand Up @@ -2846,35 +2846,9 @@ public void type(String locator, String value) {
return;
}

int maxRetries = 5;
int retryCount = 0;
webElement.clear();

while (retryCount < maxRetries) {
webElement.clear();

typeKeys(locator, value);

String typedValue = webElement.getAttribute("value");

if (typedValue.equals(value)) {
return;
}

retryCount++;

String message =
"Actual typed value: '" + typedValue +
"' did not match expected typed value: '" + value + "'.";

if (retryCount < maxRetries) {
System.out.println(
message + " Retrying LiferaySelenium.type() attempt #" +
(retryCount + 1) + ".");
}
else {
throw new RuntimeException(message);
}
}
typeKeys(locator, value);
}

@Override
Expand Down

0 comments on commit 350e0a1

Please sign in to comment.