@@ -19,16 +19,15 @@ public class HomePage {
1919 private By lastNameField = By .cssSelector ("[name=\" input_9\" ]" );
2020 private By emailField = By .cssSelector ("[name=\" input_2\" ]" );
2121 private By phoneField = By .cssSelector ("[name=\" input_7\" ]" );
22- private By submitBtn = By .cssSelector (".gform_button " );
23- private By videoPlayer = By .id ( "player " );
22+ private By submitBtn = By .cssSelector ("#gform_submit_button_16 " );
23+ private By clsBtn = By .cssSelector ( ".close-btn " );
2424
2525 public HomePage (WebDriver driver ) {
2626 this .driver = driver ;
2727 wait = new WebDriverWait (driver , 15 );
2828 }
2929
3030 public void clickWatchDemo () {
31- wait .until (ExpectedConditions .invisibilityOfElementLocated (cookieWindow ));
3231 wait .until (ExpectedConditions .visibilityOfElementLocated (watchDemoBtn ));
3332 driver .findElement (watchDemoBtn ).click ();
3433 }
@@ -38,6 +37,7 @@ public void submitWatchDemoForm(String firstName, String lastName, String email,
3837 inputLastName (lastName );
3938 inputEmail (email );
4039 inputPhoneNumber (phone );
40+ driver .findElement (submitBtn ).submit ();
4141 }
4242
4343 private void inputFirstName (String firstName ){
@@ -60,7 +60,7 @@ private void inputPhoneNumber(String phone) {
6060 }
6161
6262 public boolean videoPlayerDisplayed (){
63- wait .until (ExpectedConditions .visibilityOfElementLocated (videoPlayer ));
64- return driver .findElement (videoPlayer ).isDisplayed ();
63+ wait .until (ExpectedConditions .visibilityOfElementLocated (clsBtn ));
64+ return driver .findElement (clsBtn ).isDisplayed ();
6565 }
6666}
0 commit comments