added testng and adapted src

This commit is contained in:
2019-07-25 09:30:41 +02:00
parent 43d2ce9a4d
commit f7bc51edfa
4 changed files with 79 additions and 55 deletions

View 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();
}
}