File tree Expand file tree Collapse file tree
src/test/java/anhtester/com/pom/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ public LoginPage(Page _page){
2828 }
2929
3030 public void loginAdminCMS (String email , String password ){
31- page .navigate (URL_ADMIN , new Page .NavigateOptions ().setWaitUntil (WaitUntilState .NETWORKIDLE ));
31+ page .navigate (URL_ADMIN );
32+ page .waitForLoadState ();
3233 Assert .assertEquals (page .locator (headerLoginPageAdmin ).textContent (), "Welcome to Anh Tester Demo" );
3334 assertThat (page .locator (headerLoginPageAdmin )).hasText ("Welcome to Anh Tester Demo" );
3435 page .fill (inputEmail , email );
@@ -39,7 +40,8 @@ public void loginAdminCMS(String email, String password){
3940 }
4041
4142 public void loginUserCMS (String email , String password ){
42- page .navigate (URL_USER , new Page .NavigateOptions ().setWaitUntil (WaitUntilState .NETWORKIDLE ));
43+ page .navigate (URL_USER );
44+ page .waitForLoadState ();
4345 page .click (buttonX );
4446 assertThat (page .locator (headerLoginPageUser )).hasText ("Login to your account." );
4547 page .fill (inputEmail , email );
You can’t perform that action at this time.
0 commit comments