Skip to content

Commit 4b6576d

Browse files
committed
Fixed issues to run first test, and updated POM
1 parent fc30d4f commit 4b6576d

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

pom.xml

+20
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,24 @@
3737
<type>maven-plugin</type>
3838
</dependency>
3939
</dependencies>
40+
<build>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-compiler-plugin</artifactId>
45+
<version>3.8.1</version>
46+
<configuration>
47+
<source>1.8</source>
48+
<target>1.8</target>
49+
</configuration>
50+
</plugin>
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-resources-plugin</artifactId>
54+
<configuration>
55+
<encoding>UTF-8</encoding>
56+
</configuration>
57+
</plugin>
58+
</plugins>
59+
</build>
4060
</project>

src/main/java/pages/HomePage.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)