Package org.richfaces.fragment.common

Examples of org.richfaces.fragment.common.Actions$WaitAction


    }

    @Override
    public RichFacesTooltip<CONTENT> hide() {
        advanced().initiateTooltipsBefore();
        new Actions(driver)
            .triggerEventByWD(advanced().getHideEvent(), advanced().getTarget())
            .perform();
        advanced().waitUntilTooltipIsNotVisible().perform();
        return this;
    }
View Full Code Here


    }

    @Override
    public RichFacesTooltip<CONTENT> show() {
        advanced().initiateTooltipsBefore();
        new Actions(driver)
            .moveToElement(advanced().getTarget())
            .triggerEventByWD(advanced().getShowEvent(), advanced().getTarget())
            .perform();
        advanced().waitUntilTooltipIsVisible().perform();
        advanced().acquireLastVisibleTooltipIDIfNotSet();
View Full Code Here

         * @param givenTarget
         * @see #setupInvoker(PopupMenuInvoker)
         * @see #setShowDelay(int)
         */
        public void show(WebElement givenTarget) {
            new Actions(browser)
                .moveToElement(givenTarget)
                .triggerEventByWD(getShowEvent(), givenTarget).perform();

            advanced().waitUntilIsVisible().perform();
        }
View Full Code Here

        selectItem(picker.pick(advanced().getItemsElements()));
        return getPuttingSelectedItem();
    }

    protected void selectItem(final WebElement item) {
        new Actions(driver).keyDown(Keys.CONTROL).click(item).keyUp(Keys.CONTROL).addAction(new Action() {
            @Override
            public void perform() {
                Graphene.waitGui().until().element(item).attribute("class").contains(advanced().getStyleForSelectedItem());
            }
        }).perform();
View Full Code Here

        }
    }

    protected void unselectAll() {
        if (!advanced().getSelectedItemsElements().isEmpty()) {
            new Actions(driver)
                .click(advanced().getItemsElements().get(0))
                .keyDown(Keys.CONTROL).click(advanced().getItemsElements().get(0))
                .keyUp(Keys.CONTROL)
                .addAction(new Action() {
                    @Override
View Full Code Here

    }

    @Override
    public void select(boolean deselectOthers) {
        if (deselectOthers) {
            new Actions(driver)
                .click(getRootElement())
                .addAction(new Action() {
                    @Override
                    public void perform() {
                        Graphene.waitGui().until().element(getRootElement()).attribute("class").contains(getStyleClassForSelectedItem());
                    }
                })
                .perform();
        } else {
            if (!isSelected()) {
                new Actions(driver)
                    .keyDown(Keys.CONTROL)
                    .click(getRootElement())
                    .keyUp(Keys.CONTROL)
                    .addAction(new Action() {
                        @Override
View Full Code Here

    }

    @Override
    public void deselect() {
        if (isSelected()) {
            new Actions(driver)
                .keyDown(Keys.CONTROL)
                .click(getRootElement())
                .keyUp(Keys.CONTROL)
                .addAction(new Action() {
                    @Override
View Full Code Here

    public class SelectOrConfirmImpl implements SelectOrConfirm {

        @Override
        public Autocomplete confirm() {
            // these two actions need to be split in order to prevent NoSuchElementException
            new Actions(driver).sendKeys(Keys.RETURN).perform();
            Graphene.waitModel().until().element(By.cssSelector("body")).is().present();
            new Actions(driver).click(driver.findElement(Utils.BY_BODY)).perform();
            advanced().waitForSuggestionsToBeNotVisible().perform();
            return RichFacesAutocomplete.this;
        }
View Full Code Here

            }

            if (advanced().getScrollingType() == ScrollingType.BY_KEYS) {
                selectWithKeys(foundValue);
            } else {
                new Actions(driver).moveToElement(foundValue).click(foundValue).perform();
            }

            advanced().waitForSuggestionsToBeNotVisible().perform();
            return RichFacesAutocomplete.this;
        }
View Full Code Here

            // if selectFirst attribute of autocomplete is set, we don't have to
            // press arrow down key for first item
            boolean skip = suggestions.get(0).getAttribute("class").contains("rf-au-itm-sel");
            int index = Utils.getIndexOfElement(foundValue);
            int steps = index + (skip ? 0 : 1);
            Actions actions = new Actions(driver);
            for (int i = 0; i < steps; i++) {
                actions.sendKeys(Keys.ARROW_DOWN);
            }
            actions.sendKeys(foundValue, Keys.RETURN).perform();
        }
View Full Code Here

TOP

Related Classes of org.richfaces.fragment.common.Actions$WaitAction

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.