use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class Clear method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchBox = driver.findElement(By.name("q"));
searchBox.sendKeys(Keys.chord(Keys.SHIFT, "packt publishing"));
searchBox.clear();
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class GetCSSValue2 method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchButton = driver.findElement(By.name("btnK"));
System.out.println(searchButton.getCssValue("background-color"));
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class GetLocation method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchButton = driver.findElement(By.name("btnK"));
System.out.println(searchButton.getLocation());
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class GetTagName method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchButton = driver.findElement(By.name("btnK"));
System.out.println(searchButton.getTagName());
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class GetText method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchButton = driver.findElement(By.name("btnK"));
System.out.println(searchButton.getText());
}
Aggregations