use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class ClickAndHold method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/Sortable.html");
Actions builder = new Actions(driver);
// Move tile3 to the position of tile2
builder.moveByOffset(200, 20).clickAndHold().moveByOffset(120, 0).perform();
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class ClickAndHold2 method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/Sortable.html");
WebElement three = driver.findElement(By.name("three"));
Actions builder = new Actions(driver);
// Move tile3 to the position of tile2
builder.clickAndHold(three).moveByOffset(120, 0).perform();
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class ByTagName method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
List<WebElement> buttons = driver.findElements(By.tagName("button"));
System.out.println(buttons.size());
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class ByXPath method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement searchButton = driver.findElement(By.xpath("//*[@id='gbqfba']"));
System.out.println(searchButton.getText());
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class GoogleSearch 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("Selenium");
searchBox.submit();
}
Aggregations