Package org.openqa.selenium.interactions

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


    wait_between_steps_plus(1);
   
    actions.clickAndHold(_nativeWebElement()).build().perform();
    wait_between_steps_plus(1);
   
    actions.moveToElement(other_element._nativeWebElement()).build().perform();
    wait_between_steps_plus(1);
   
    actions.release().build().perform();
  }
 
View Full Code Here


   public static WebElement getMenuItem(final WebDriver driver, String level1,
                                        String level2, String level3)
   {
      WebElement popupItem = getMenuItem(driver, level1, level2);
      Actions action = new Actions(driver);
      action.moveToElement(popupItem).build().perform();
     
      // Wait for there to be two popups open (the level1 and level2 menus)
      (new WebDriverWait(driver, 1)).until(new ExpectedCondition<Boolean>() {
         public Boolean apply(WebDriver d) {
            List<WebElement>elements = driver.findElements(
View Full Code Here

        element.sendKeys(new String("2012-10-30"));

        element = findElementById("label1");

        final Actions actions = new Actions(webDriver);
        actions.moveToElement(element).build().perform();
        actions.click().build().perform();

        final PValueChangeEvent<Date> e2 = eventsListener.poll();
        Assert.assertEquals("2012-10-30", dateFormat.format(e2.getValue()));
        Assert.assertEquals("2012-10-30", dateBox1.getDisplayedValue());
View Full Code Here

    @Test
    public void testPFocusPanel() {

        final WebElement e = findElementById("startingpoint");
        final Actions actions = new Actions(webDriver);
        actions.moveToElement(e).build().perform();

        // creation
        updateUI(new RequestHandler() {

            @Override
View Full Code Here

                register(focusPanel1);
            }
        });

        final WebElement focusTopLabel = findElementById("focusTopLabel");
        actions.moveToElement(focusTopLabel).click().build().perform();

        // Mouse over
        final WebElement focusPanel1 = findElementById("focusPanel1");
        actions.moveToElement(focusPanel1).build().perform();
        final PMouseOverEvent e1 = eventsListener.poll();
View Full Code Here

        final WebElement focusTopLabel = findElementById("focusTopLabel");
        actions.moveToElement(focusTopLabel).click().build().perform();

        // Mouse over
        final WebElement focusPanel1 = findElementById("focusPanel1");
        actions.moveToElement(focusPanel1).build().perform();
        final PMouseOverEvent e1 = eventsListener.poll();
        Assert.assertNotNull(e1);

        // Focus
        actions.click().build().perform();
View Full Code Here

        final PKeyUpEvent e4 = eventsListener.poll();
        Assert.assertNotNull(e3);
        Assert.assertEquals(65, e4.getKeyCode());

        final WebElement focusBottomLabel = findElementById("focusBottomLabel");
        actions.moveToElement(focusBottomLabel).click().build().perform();
        final PBlurEvent e5 = eventsListener.poll();
        Assert.assertNotNull(e5);
    }

    @Test
View Full Code Here

        moveToElement(webElement);
    }

    private void moveToElement(WebElement webElement) {
        Actions actions = new Actions(webDriver);
        actions.moveToElement(webElement);
        actions.perform();
    }

    private WebDriverWait webDriverWait() {
        return new WebDriverWait(webDriver, TestParameters.TIME_OUT_IN_SECONDS);
View Full Code Here

        return 0;
    }

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

     */
    public void setHoverOverElement(String elem) {
        Actions builder = new Actions(driver);
        // find the element a 2nd time which helps get around the IE hover issues by focusing the element
        WebElement element = driver.findElement(By.className(elem));
        builder.moveToElement(element).build().perform();
    }

    /**
     * Get the text content of a DOM node. Tries "innerText" followed by "textContext" to take browser differences into
     * account.
 
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.