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