File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
java/client/test/org/openqa/selenium Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1919
2020import static org .junit .Assert .assertEquals ;
2121import static org .openqa .selenium .support .ui .ExpectedConditions .alertIsPresent ;
22+ import static org .openqa .selenium .support .ui .ExpectedConditions .presenceOfElementLocated ;
2223import static org .openqa .selenium .testing .Ignore .Driver .CHROME ;
2324import static org .openqa .selenium .testing .Ignore .Driver .FIREFOX ;
2425import static org .openqa .selenium .testing .Ignore .Driver .HTMLUNIT ;
@@ -46,7 +47,8 @@ public void canAuthenticateUsingBasicAuthentication() {
4647
4748 alert .authenticateUsing (user );
4849
49- assertEquals ("authorized" , driver .findElement (By .tagName ("h1" )).getText ());
50+ WebElement element = wait .until (presenceOfElementLocated (By .tagName ("h1" )));
51+ assertEquals ("authorized" , element .getText ());
5052 }
5153
5254 @ Test
You can’t perform that action at this time.
0 commit comments