Package org.openqa.selenium.interactions

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


        return findElement(By.className("v-contextmenu"));
    }

    private void closeContextMenu() {
        Actions actions = new Actions(getDriver());
        actions.click().build().perform();
    }

}
View Full Code Here


    public void testTextAreaDndImage() {
        openTestURL();

        WebElement wrapper = driver.findElement(By.className("v-ddwrapper"));
        Actions actions = new Actions(driver);
        actions.click(wrapper);
        actions.perform();

        WebElement focusedElement = driver.findElement(By
                .className("v-textarea-focus"));
        Assert.assertNotNull("Text area did not obtain focus after click",
View Full Code Here

            throws InterruptedException {
        openTestURL();

        WebElement textArea = $(TextAreaElement.class).first();
        Actions builder = new Actions(driver);
        builder.click(textArea);
        builder.sendKeys(textArea, "first line asdf");
        builder.keyDown(Keys.SHIFT);
        builder.sendKeys(Keys.ENTER);
        builder.keyUp(Keys.SHIFT);
        builder.sendKeys(textArea, "second line jkl;");
View Full Code Here

    public void textAreaCtrlEnterEventPropagation() throws InterruptedException {
        openTestURL();

        WebElement textArea = $(TextAreaElement.class).first();
        Actions builder = new Actions(driver);
        builder.click(textArea);
        builder.sendKeys(textArea, "first line asdf");
        builder.keyDown(Keys.CONTROL);
        builder.sendKeys(Keys.ENTER);
        builder.keyUp(Keys.CONTROL);
        builder.sendKeys(textArea, "second line jkl;");
View Full Code Here

    @Test
    public void textAreaEnterEventPropagation() throws InterruptedException {
        openTestURL();
        WebElement textArea = $(TextAreaElement.class).first();
        Actions builder = new Actions(driver);
        builder.click(textArea);
        builder.sendKeys(textArea, "first line asdf");
        builder.sendKeys(Keys.ENTER);
        builder.sendKeys(textArea, "second line jkl;");
        builder.perform();
View Full Code Here

    public void testTextAreaEscapeEventPropagation()
            throws InterruptedException {
        openTestURL();
        WebElement textArea = $(TextAreaElement.class).first();
        Actions builder = new Actions(driver);
        builder.click(textArea);
        builder.sendKeys(textArea, "first line asdf");
        builder.sendKeys(Keys.ESCAPE);
        builder.sendKeys(textArea, "second line jkl;");
        builder.perform();
View Full Code Here

    @Test
    public void testTextFieldEscapeEventPropagation() {
        openTestURL();
        WebElement textField = $(TextFieldElement.class).first();
        Actions builder2 = new Actions(driver);
        builder2.click(textField);

        builder2.sendKeys("third line");
        builder2.sendKeys(Keys.ENTER);
        builder2.sendKeys(Keys.ESCAPE);
View Full Code Here

    @Test
    public void testTextFieldEnterEventPropagation() {
        openTestURL();
        WebElement textField = $(TextFieldElement.class).first();
        Actions builder2 = new Actions(driver);
        builder2.click(textField);

        builder2.sendKeys("third line");
        builder2.sendKeys(Keys.ENTER);

        builder2.perform();
View Full Code Here

    @Test
    public void testSupportForAdvancedActions() {
        Actions builder = new Actions(selenium);

        // following tests usage of Actions with injected plain WebElement
        builder.click(input);
        // following with List<WebElement>
        builder.click(divs.get(0));
        // following with WebElements from Page Fragments
        builder.click(abstractPageFragmentStub.getLocatorRefByXPath());
        // following with List of WebElements from Page Fragments
View Full Code Here

        Actions builder = new Actions(selenium);

        // following tests usage of Actions with injected plain WebElement
        builder.click(input);
        // following with List<WebElement>
        builder.click(divs.get(0));
        // following with WebElements from Page Fragments
        builder.click(abstractPageFragmentStub.getLocatorRefByXPath());
        // following with List of WebElements from Page Fragments
        builder.click(abstractPageFragmentStub.getSpansInPageFragment().get(0));
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.