Automation test отваря Mozilla без firebug
Здравейте. Като си стартирам automation тестовете винаги се отваря мозилата без add on-ите.
При вас така ли е ? Ако някой знае как се оправя това да сподели.
Мерси !
Ето и примерен работещ код:
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import static org.junit.Assert.assertEquals;
/**
* Created by Gerganka on 4/15/2016.
*/
public class SoftUniTest
{
private WebDriver driver;
@Before
public void SetUp() {
driver = new FirefoxDriver();
}
public void executeLogin() {
driver.get("http://www.abv.bg");
String validUsername = "qafundamentals123";
String validPassword = "qafundamentals123";
WebElement usernameField = driver.findElement(By.id("username"));
WebElement passField = driver.findElement(By.id("password"));
usernameField.clear();
usernameField.sendKeys(validUsername);
passField.clear();
passField.sendKeys(validPassword);
WebElement loginButton =driver.findElement(By.id("loginBut"));
loginButton.click();
}
@Test
public void ValidLoginName(){
this.executeLogin();
WebElement fullname = driver.findElement(By.className("userName"));
assertEquals(
"Гергана Суванджиева",
fullname.getText()
);
}
@After
public void terDown(){
}
}