Skip to content

Commit 8d5a5a0

Browse files
#203 fix The additional improvement of @WithTimeout
1 parent 246177c commit 8d5a5a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/io/appium/java_client/pagefactory/AppiumElementLocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public List<WebElement> apply(By by) {
8181
automation);
8282
if (field.isAnnotationPresent(WithTimeout.class)){
8383
WithTimeout withTimeout = field.getAnnotation(WithTimeout.class);
84-
this.timeOutDuration = new TimeOutDuration(withTimeout.timeout(), withTimeout.timeUnit());
84+
this.timeOutDuration = new TimeOutDuration(withTimeout.time(), withTimeout.unit());
8585
}
8686
else
8787
this.timeOutDuration = timeOutDuration;

src/main/java/io/appium/java_client/pagefactory/WithTimeout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
that differs from defined by default
1515
*/
1616
public @interface WithTimeout {
17-
long timeout();
18-
TimeUnit timeUnit();
17+
long time();
18+
TimeUnit unit();
1919
}

src/test/java/io/appium/java_client/pagefactory_tests/TimeOutResetTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class TimeOutResetTest {
2828
@FindBy(className = "OneAnotherClassWhichDoesNotExist")})
2929
private List<WebElement> stubElements;
3030

31-
@WithTimeout(timeout = 5, timeUnit = TimeUnit.SECONDS)
31+
@WithTimeout(time = 5, unit = TimeUnit.SECONDS)
3232
@FindAll({@FindBy(className = "ClassWhichDoesNotExist"),
3333
@FindBy(className = "OneAnotherClassWhichDoesNotExist")})
3434
private List<WebElement> stubElements2;

0 commit comments

Comments
 (0)