use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class SendKeys 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("Packt Publishing");
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class SendKeys2 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"));
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class ByCSSSelector2 method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchButton = driver.findElement(By.cssSelector("#flrs>a[href='/intl/en/about.html']"));
System.out.println(searchButton.getText());
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class ByClassName method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchBox = driver.findElement(By.className("gbqfif"));
searchBox.sendKeys("Selenium");
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class ById method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchBox = driver.findElement(By.id("gbqfba"));
searchBox.submit();
}
Aggregations