added testng and adapted src
This commit is contained in:
32
src/test/java/BasicTest.java
Normal file
32
src/test/java/BasicTest.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package org.fremo.fredl.test;
|
||||
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
//import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
|
||||
import org.openqa.selenium.support.ui.ExpectedCondition;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
public class BasicTest {
|
||||
private WebDriver driver;
|
||||
String URL = "http://google.com";
|
||||
|
||||
@BeforeClass
|
||||
public void testSetUp() {
|
||||
|
||||
driver = new HtmlUnitDriver(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyGooglePageTitle() {
|
||||
driver.navigate().to(URL);
|
||||
String getTitle = driver.getTitle();
|
||||
Assert.assertEquals(getTitle, "Google");
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public void tearDown() {
|
||||
driver.quit();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user