use of org.openqa.selenium.WebElement in project java.webdriver by sayems.
the class ClickOnWebElement2 method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/Selectable.html");
WebElement one = driver.findElement(By.name("one"));
WebElement eleven = driver.findElement(By.name("eleven"));
WebElement five = driver.findElement(By.name("five"));
Actions builder = new Actions(driver);
// Click on One, Eleven and Five
builder.click(one).click(eleven).click(five);
builder.build().perform();
}
use of org.openqa.selenium.WebElement in project java.webdriver by sayems.
the class ContextClick method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/ContextClick.html");
WebElement contextMenu = driver.findElement(By.id("div-context"));
Actions builder = new Actions(driver);
builder.contextClick(contextMenu).click(driver.findElement(By.name("Item 4"))).perform();
}
use of org.openqa.selenium.WebElement in project java.webdriver by sayems.
the class DoubleClick2 method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/DoubleClick.html");
WebElement dblClick = driver.findElement(By.name("dblClick"));
Actions builder = new Actions(driver);
builder.moveToElement(dblClick).doubleClick().perform();
}
use of org.openqa.selenium.WebElement in project java.webdriver by sayems.
the class DragAndDrop method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/DragAndDrop.html");
WebElement src = driver.findElement(By.id("draggable"));
WebElement trgt = driver.findElement(By.id("droppable"));
Actions builder = new Actions(driver);
builder.dragAndDrop(src, trgt).perform();
}
use of org.openqa.selenium.WebElement in project java.webdriver by sayems.
the class DragMe method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/DragMe.html");
WebElement dragMe = driver.findElement(By.id("draggable"));
Actions builder = new Actions(driver);
builder.dragAndDropBy(dragMe, 300, 200).perform();
}
Aggregations