@@ -131,7 +131,7 @@ public void testEagerStrategyShouldNotWaitForResources() {
131
131
localDriver .get (slowPage );
132
132
// We discard the element, but want a check to make sure the GET actually
133
133
// completed.
134
- localDriver . findElement ( By .id ("peas" ));
134
+ new WebDriverWait ( localDriver , 10 ). until ( presenceOfElementLocated ( By .id ("peas" ) ));
135
135
long end = System .currentTimeMillis ();
136
136
137
137
// The slow loading resource on that page takes 6 seconds to return. If we
@@ -140,7 +140,7 @@ public void testEagerStrategyShouldNotWaitForResources() {
140
140
assertTrue ("Took too long to load page: " + duration , duration < 5 * 1000 );
141
141
}
142
142
143
- @ Ignore (value = {FIREFOX , IE , CHROME , SAFARI , MARIONETTE , PHANTOMJS , HTMLUNIT })
143
+ @ Ignore (value = {IE , CHROME , SAFARI , MARIONETTE , PHANTOMJS , HTMLUNIT })
144
144
@ NeedsLocalEnvironment
145
145
@ Test
146
146
public void testEagerStrategyShouldNotWaitForResourcesOnRefresh () {
@@ -150,12 +150,12 @@ public void testEagerStrategyShouldNotWaitForResourcesOnRefresh() {
150
150
151
151
localDriver .get (slowPage );
152
152
// We discard the element, but want a check to make sure the GET actually completed.
153
- localDriver . findElement ( By .id ("peas" ));
153
+ new WebDriverWait ( localDriver , 10 ). until ( presenceOfElementLocated ( By .id ("peas" ) ));
154
154
155
155
long start = System .currentTimeMillis ();
156
156
localDriver .navigate ().refresh ();
157
157
// We discard the element, but want a check to make sure the refresh actually completed.
158
- localDriver . findElement ( By .id ("peas" ));
158
+ new WebDriverWait ( localDriver , 10 ). until ( presenceOfElementLocated ( By .id ("peas" ) ));
159
159
long end = System .currentTimeMillis ();
160
160
161
161
// The slow loading resource on that page takes 6 seconds to return. If we
@@ -173,7 +173,7 @@ public void testEagerStrategyShouldWaitForDocumentToBeLoaded() {
173
173
localDriver .get (slowPage );
174
174
175
175
// We discard the element, but want a check to make sure the GET actually completed.
176
- localDriver . findElement ( By .tagName ("body" ));
176
+ new WebDriverWait ( localDriver , 10 ). until ( presenceOfElementLocated ( By .tagName ("body" ) ));
177
177
}
178
178
179
179
@ Test
0 commit comments