Fixed compilation errors
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
package test.java.com.baeldung.selenium.junit;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
import main.java.com.baeldung.selenium.SeleniumExample;
|
||||
|
||||
import org.junit.After;
|
||||
@@ -25,7 +26,7 @@ public class TestSeleniumWithJUnit {
|
||||
@Test
|
||||
public void whenPageIsLoaded_thenTitleIsAsPerExpectation() {
|
||||
String actualTitle = seleniumExample.getTitle();
|
||||
assertNotNull(actualTitle);
|
||||
assertNotNull(actualTitle);
|
||||
assertEquals(actualTitle, expectedTitle);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
package test.java.com.baeldung.selenium.testng;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
import main.java.com.baeldung.selenium.SeleniumExample;
|
||||
|
||||
import org.testng.annotations.AfterSuite;
|
||||
@@ -10,7 +11,7 @@ import org.testng.annotations.Test;
|
||||
public class TestSeleniumWithTestNG {
|
||||
|
||||
private SeleniumExample seleniumExample;
|
||||
private String expectedTitle = "Baeldung | Java, Spring and Web Development tutorials";
|
||||
private String expectedTitle = "Baeldung | Java, Spring and Web Development tutorials";
|
||||
|
||||
@BeforeSuite
|
||||
public void setUp() {
|
||||
@@ -25,7 +26,7 @@ public class TestSeleniumWithTestNG {
|
||||
@Test
|
||||
public void whenPageIsLoaded_thenTitleIsAsPerExpectation() {
|
||||
String actualTitle = seleniumExample.getTitle();
|
||||
assertNotNull(actualTitle);
|
||||
assertNotNull(actualTitle);
|
||||
assertEquals(actualTitle, expectedTitle);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user