File tree 2 files changed +3
-3
lines changed
src/org/openqa/selenium/support/ui
test/org/openqa/selenium/support/ui
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -859,7 +859,7 @@ public static ExpectedCondition<Boolean> not(final ExpectedCondition<?> conditio
859
859
@ Override
860
860
public Boolean apply (WebDriver driver ) {
861
861
Object result = condition .apply (driver );
862
- return result == null || result == Boolean .FALSE ;
862
+ return result == null || result . equals ( Boolean .FALSE ) ;
863
863
}
864
864
865
865
@ Override
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ public void waitingForVisibilityOfElementInverse_elementStaysVisible()
234
234
235
235
@ Test
236
236
public void invertingAConditionThatReturnsFalse () {
237
- when (mockCondition .apply (mockDriver )).thenReturn (false );
237
+ when (mockCondition .apply (mockDriver )).thenReturn (new Boolean ( false ) );
238
238
239
239
assertTrue (wait .until (not (mockCondition )));
240
240
verifyZeroInteractions (mockSleeper );
@@ -252,7 +252,7 @@ public void invertingAConditionThatReturnsNull() {
252
252
public void invertingAConditionThatAlwaysReturnsTrueTimesout () throws InterruptedException {
253
253
when (mockClock .laterBy (1000L )).thenReturn (3000L );
254
254
when (mockClock .isNowBefore (3000L )).thenReturn (true , false );
255
- when (mockCondition .apply (mockDriver )).thenReturn (true );
255
+ when (mockCondition .apply (mockDriver )).thenReturn (new Boolean ( true ) );
256
256
257
257
try {
258
258
wait .until (not (mockCondition ));
You can’t perform that action at this time.
0 commit comments