Skip to content

Commit a6df515

Browse files
committed
rename DEFAULT_IMPLICITLY_WAIT_TIMEOUT to DEFAULT_TIMEOUT
1 parent b68ec85 commit a6df515

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class AppiumFieldDecorator implements FieldDecorator {
6262
private static final List<Class<? extends WebElement>> availableElementClasses = ImmutableList.of(WebElement.class,
6363
RemoteWebElement.class, MobileElement.class, AndroidElement.class,
6464
IOSElement.class, WindowsElement.class);
65-
public static long DEFAULT_IMPLICITLY_WAIT_TIMEOUT = 1;
65+
public static long DEFAULT_TIMEOUT = 1;
6666
public static TimeUnit DEFAULT_TIMEUNIT = TimeUnit.SECONDS;
6767
private final WebDriver originalDriver;
6868
private final DefaultFieldDecorator defaultElementFieldDecoracor;
@@ -73,9 +73,9 @@ public class AppiumFieldDecorator implements FieldDecorator {
7373
private final HasSessionDetails hasSessionDetails;
7474

7575

76-
public AppiumFieldDecorator(SearchContext context, long implicitlyWaitTimeOut,
76+
public AppiumFieldDecorator(SearchContext context, long timeOut,
7777
TimeUnit timeUnit) {
78-
this(context, new TimeOutDuration(implicitlyWaitTimeOut, timeUnit));
78+
this(context, new TimeOutDuration(timeOut, timeUnit));
7979
}
8080

8181
/**
@@ -144,7 +144,7 @@ protected List<WebElement> proxyForListLocator(ClassLoader ignored,
144144
}
145145

146146
public AppiumFieldDecorator(SearchContext context) {
147-
this(context, DEFAULT_IMPLICITLY_WAIT_TIMEOUT, DEFAULT_TIMEUNIT);
147+
this(context, DEFAULT_TIMEOUT, DEFAULT_TIMEUNIT);
148148
}
149149

150150
/**

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private static boolean checkTimeDifference(long expectedTime, TimeUnit expectedT
8282
"src/test/java/io/appium/java_client/pagefactory_tests/chromedriver");
8383
}
8484
driver = new ChromeDriver();
85-
timeOutDuration = new TimeOutDuration(AppiumFieldDecorator.DEFAULT_IMPLICITLY_WAIT_TIMEOUT,
85+
timeOutDuration = new TimeOutDuration(AppiumFieldDecorator.DEFAULT_TIMEOUT,
8686
AppiumFieldDecorator.DEFAULT_TIMEUNIT);
8787
PageFactory.initElements(new AppiumFieldDecorator(driver, timeOutDuration), this);
8888
}
@@ -102,10 +102,10 @@ private long getBenchMark(List<WebElement> stubElements) {
102102
}
103103

104104
@Test public void test() {
105-
assertTrue(checkTimeDifference(AppiumFieldDecorator.DEFAULT_IMPLICITLY_WAIT_TIMEOUT,
105+
assertTrue(checkTimeDifference(AppiumFieldDecorator.DEFAULT_TIMEOUT,
106106
AppiumFieldDecorator.DEFAULT_TIMEUNIT, getBenchMark(stubElements)));
107107
System.out.println(
108-
String.valueOf(AppiumFieldDecorator.DEFAULT_IMPLICITLY_WAIT_TIMEOUT) + " "
108+
String.valueOf(AppiumFieldDecorator.DEFAULT_TIMEOUT) + " "
109109
+ AppiumFieldDecorator.DEFAULT_TIMEUNIT.toString() + ": Fine");
110110

111111
timeOutDuration.setTime(15500000, TimeUnit.MICROSECONDS);
@@ -122,10 +122,10 @@ private long getBenchMark(List<WebElement> stubElements) {
122122
}
123123

124124
@Test public void test2() {
125-
assertTrue(checkTimeDifference(AppiumFieldDecorator.DEFAULT_IMPLICITLY_WAIT_TIMEOUT,
125+
assertTrue(checkTimeDifference(AppiumFieldDecorator.DEFAULT_TIMEOUT,
126126
AppiumFieldDecorator.DEFAULT_TIMEUNIT, getBenchMark(stubElements)));
127127
System.out.println(
128-
String.valueOf(AppiumFieldDecorator.DEFAULT_IMPLICITLY_WAIT_TIMEOUT) + " "
128+
String.valueOf(AppiumFieldDecorator.DEFAULT_TIMEOUT) + " "
129129
+ AppiumFieldDecorator.DEFAULT_TIMEUNIT.toString() + ": Fine");
130130

131131
assertTrue(checkTimeDifference(5, TimeUnit.SECONDS, getBenchMark(stubElements2)));
@@ -148,7 +148,7 @@ private long getBenchMark(List<WebElement> stubElements) {
148148
long startMark = Calendar.getInstance().getTimeInMillis();
149149
driver.findElements(By.id("FakeId"));
150150
long endMark = Calendar.getInstance().getTimeInMillis();
151-
assertTrue(checkTimeDifference(AppiumFieldDecorator.DEFAULT_IMPLICITLY_WAIT_TIMEOUT,
151+
assertTrue(checkTimeDifference(AppiumFieldDecorator.DEFAULT_TIMEOUT,
152152
AppiumFieldDecorator.DEFAULT_TIMEUNIT, endMark - startMark));
153153
}
154154

0 commit comments

Comments
 (0)