Package org.openqa.selenium.interactions

Examples of org.openqa.selenium.interactions.Actions


     * @param string
     */
    private void menuSub(String string) {
        getDriver().findElement(By.xpath("//span[text() = '" + string + "']"))
                .click();
        new Actions(getDriver()).moveByOffset(100, 0).build().perform();
    }
View Full Code Here


                String.format("Couldn't find text '%s' from the log.", text),
                logContainsText(text));
    }

    private void performLeftClick() {
        new Actions(driver).click(getTreeNode("Caption 1")).build().perform();
    }
View Full Code Here

    private void performLeftClick() {
        new Actions(driver).click(getTreeNode("Caption 1")).build().perform();
    }

    private void performRightClick() {
        new Actions(driver).contextClick(getTreeNode("Caption 2")).build()
                .perform();
    }
View Full Code Here

        checkEventSourceIsCalendar();
    }

    private void performAction(WebElement element) {
        // right click
        new Actions(getDriver()).contextClick(element).perform();
        WebElement menuItem = getDriver().findElement(
                By.className("gwt-MenuItem"));
        menuItem.click();
    }
View Full Code Here

        openTestURL();

        WebElement day = findElements(By.className("v-calendar-day-number"))
                .get(2);
        // IE8 requires you to click on the text part to fire the event
        new Actions(getDriver()).moveToElement(day, 83, 11).click().perform();

        Assert.assertTrue("There should be a notification",
                $(NotificationElement.class).exists());

        // move the mouse around a bit
        new Actions(getDriver()).moveByOffset(5, 5).moveByOffset(100, 100)
                .perform();

        // wait until the notification has animated out
        sleep(1000);
View Full Code Here

  public void send (CharSequence... strokes) {
    getStrokeSender();
    strokeSender.setup();

    for (CharSequence s: strokes) {
      (new Actions(driver)).sendKeys(s).perform();
    }

    WebElement elm = strokeSender.waitCommandCompletion();
    strokeSender.finish(elm);
View Full Code Here

  public void send (WasaviSendCallback callback) {
    getStrokeSender();
    strokeSender.setup();

    Actions act = new Actions(driver);
    callback.exec(act);
    act.perform();

    WebElement elm = strokeSender.waitCommandCompletion();
    strokeSender.finish(elm);

    inputModeOfWacthTarget = inputModeOfWacthTargetDefault;
View Full Code Here

    strokeSender.finish(elm);
    inputModeOfWacthTarget = inputModeOfWacthTargetDefault;
  }

  public void sendNoWait (CharSequence stroke) {
    (new Actions(driver)).sendKeys(stroke).perform();
  }
View Full Code Here

        cell_1_1 = table.getCell(1, 1);
        cell_1_1.showTooltip();
        checkTooltip("Cell description item 1, Component");

        // move somewhere without a description
        new Actions(getDriver()).moveToElement(checkboxes.get(2)).perform();
        sleep(1000);
        checkTooltipNotPresent();

        // check textfield's description
        cell_1_2 = table.getCell(1, 2);
View Full Code Here

        assertEquals(3, checkboxes.size());

        TestBenchElement cell_3_0 = table.getCell(3, 0);

        // move to the center of the cell
        new Actions(getDriver()).moveToElement(cell_3_0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Cell description item 3, Text");
        clearTooltip();

        // move outside the cell
        new Actions(getDriver()).moveToElement(checkboxes.get(2)).perform();

        // move to the corner of the cell
        new Actions(getDriver()).moveToElement(cell_3_0, 0, 0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Cell description item 3, Text");
        clearTooltip();

        // uncheck cell tooltips
        checkboxes.get(1).findElement(By.tagName("input")).click();

        TestBenchElement cell_1_1 = table.getCell(1, 1);

        // move to the center of the cell
        new Actions(getDriver()).moveToElement(cell_1_1).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Button 1 description");
        clearTooltip();

        // move to the corner of the element, outside of the button
        new Actions(getDriver()).moveToElement(cell_1_1, 0, 0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Row description item 1");
        clearTooltip();

        // check cell tooltips
        checkboxes.get(1).findElement(By.tagName("input")).click();

        TestBenchElement cell_4_2 = table.getCell(4, 2);

        // move to the center of the cell
        new Actions(getDriver()).moveToElement(cell_4_2).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Textfield's own description");
        clearTooltip();

        // move to the corner of the element, outside of the textfield
        new Actions(getDriver()).moveToElement(cell_4_2, 0, 0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Cell description item 4, Generated component");
        clearTooltip();
View Full Code Here

TOP

Related Classes of org.openqa.selenium.interactions.Actions

Copyright © 2018 www.massapicom. 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.