Package org.openqa.selenium.interactions

Examples of org.openqa.selenium.interactions.Actions.build()


        //click right arrow
        Actions right = new Actions(getDriver()).moveToElement(
                getDriver().findElement(By.xpath(multipleNodeDataTreeTable.getXPath())))
                .sendKeys(Keys.ARROW_RIGHT);
        right.build().perform();
//        multipleNodePathsTreeTable.keyPress(Keys.ARROW_RIGHT);
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        for (int i = 0; i < 3; i++) {
            createEvent(multipleNodePathsTreeTable, null, EventType.KEY, "keypress", KeyEvent.VK_DOWN, true);
        }
View Full Code Here


        testAppFunctionalPage("/components/treetable/treeTableSingleSelection.jsf");
        /*check selection and keyboard navigation on the simple TreeTable*/
        Actions click = new Actions(getDriver()).moveToElement(
                getDriver().findElement(By.id("formID:singleSelectionTreeTableID:0:categoryID")))
                .click();
        click.build().perform();

        ElementInspector emptyElement = element("empty");
        ElementInspector treeTable = element("formID:singleSelectionTreeTableID");
        treeTable.focus();
        for (int i = 1; i < 26; i++) {
View Full Code Here

        //check keyboard navigation for single selection
        DataTableInspector singleSelectionDataTable = dataTable("formID:singleSelectionDataTable");
        Actions click= new Actions(getDriver()).moveToElement(
                    getDriver().findElement(By.xpath(singleSelectionDataTable.bodyRow(0).getXPath())))
                    .click();
        click.build().perform();
        for (int i = 0; i < 8; i++) {
            Actions keyDown = new Actions(getDriver()).sendKeys(Keys.ARROW_DOWN);
            keyDown.build().perform();
            singleSelectionDataTable.checkSelectedIndex(i + 1);
        }
View Full Code Here

                    getDriver().findElement(By.xpath(singleSelectionDataTable.bodyRow(0).getXPath())))
                    .click();
        click.build().perform();
        for (int i = 0; i < 8; i++) {
            Actions keyDown = new Actions(getDriver()).sendKeys(Keys.ARROW_DOWN);
            keyDown.build().perform();
            singleSelectionDataTable.checkSelectedIndex(i + 1);
        }

        //check selection with the mouse help
        Random rand = new Random();
View Full Code Here

    }

    private void moveToElement(WebElement tableHeader) {
        Actions action = new Actions(webDriver);
        action.moveToElement(tableHeader);
        action.build().perform();
    }
}
View Full Code Here

                    firstrun = false;
                    builder.keyDown(Keys.CONTROL);
                }
            }
            builder.keyUp(Keys.CONTROL);
            builder.build().perform();
        } else {
            selection.get(0).click();
        }
    }
View Full Code Here

            case dnd:
                Actions builder = new Actions(driver);
                for (WebElement keyElement : selection) {
                    dragAndDropActionWithPositiveOffset(builder, keyElement, to.getRoot());
                }
                builder.build().perform();
                break;
            default:
                throw new UnsupportedOperationException("Unknown switch " + with);

        }
View Full Code Here

                button.click();
                break;
            case dnd:
                Actions builder = new Actions(driver);
                dragAndDropActionWithPositiveOffset(builder, selection.get(0), to.getRoot());
                builder.build().perform();
                break;
            default:
                throw new UnsupportedOperationException("Unknown switch " + with);
        }
        picklist.waitForListSizesChange(sourceListSizeFinalSize, targetListFinalSize);
View Full Code Here

    public Action shiftTab() {
        Actions builder = new Actions(currentDriver);
        builder.keyDown(Keys.SHIFT)
                .sendKeys(Keys.TAB)
                .keyUp(Keys.SHIFT);
        return builder.build();
    }

    /**
     * Flick starting at on_element, and moving by the xoffset and yoffset with normal speed
     *
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.