Package org.richfaces.utils.focus

Examples of org.richfaces.utils.focus.ElementIsFocused


    @FindByJQuery("*[id*=output]")
    private WebElement output;

    public void waitTillFirstInputIsFocused() {
        waitModel().withTimeout(ITestFocus.TIMEOUT_FOCUS, TimeUnit.SECONDS).until(new ElementIsFocused(input.advanced().getInputElement()));
    }
View Full Code Here


        cancelButton.click();
        waitGui().until().element(saveButton).is().not().visible();
    }

    public void waitForFocusIsGiven(WebElement input) {
        waitModel().withTimeout(ITestFocus.TIMEOUT_FOCUS, TimeUnit.SECONDS).until(new ElementIsFocused(input));
    }
View Full Code Here

    @FindByJQuery("*[value*='Ajax']")
    private WebElement ajaxButton;

    public void waitTillSecondInputIsFocused() {
        waitModel().withMessage("Second input should be focused!").withTimeout(ITestFocus.TIMEOUT_FOCUS, TimeUnit.SECONDS)
                .until(new ElementIsFocused(secondInput));
    }
View Full Code Here

    public static final int TIMEOUT_FOCUS = 2;

    @Test
    public void testFirstInputFocusedAfterPageLoad() {
        waitModel().withTimeout(TIMEOUT_FOCUS, TimeUnit.SECONDS).until(new ElementIsFocused(page.getNameInput().advanced().getInputElement()));
    }
View Full Code Here

    public void testFocusOnJobWhenItDoesNotPassValidation() {
        page.getNameInput().sendKeys("RichFaces");
        page.getJobInput().sendKeys("1");

        page.getSubmitButton().click();
        waitModel().withTimeout(TIMEOUT_FOCUS, TimeUnit.SECONDS).until(new ElementIsFocused(page.getJobInput().advanced().getInputElement()));
    }
View Full Code Here

    @Test
    @Category(Smoke.class)
    public void test_FocusManager_on_initial_request() {
        Warp.initiate(openPage).inspect(new VerifyFocusEnforcing("input2"));

        Graphene.waitGui().until(new ElementIsFocused(input2));
    }
View Full Code Here

        browser.get(contextPath.toExternalForm());
        // when
        Warp.initiate(submit)
        // then
                .inspect(new VerifyFocusEnforcing("input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));
    }
View Full Code Here

        browser.get(contextPath.toExternalForm());
        // when
        Warp.initiate(ajax)
        // then
                .inspect(new VerifyFocusEnforcing("input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));
    }
View Full Code Here

    public void when_there_is_form_based_focus_but_focus_was_enforced_using_FocusManager_then_it_is_not_aplied() {

        contextPath = URLUtils.buildUrl(contextPath, "form.jsf");

        Warp.initiate(openPage).inspect(new VerifyFocusEnforcingOverridesFocusSettings("form:input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));

        Warp.initiate(submit).inspect(new VerifyFocusEnforcingOverridesFocusSettings("form:input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));

        Warp.initiate(ajax).inspect(new VerifyFocusEnforcingOverridesFocusSettings("form:input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));
    }
View Full Code Here

    public void when_there_is_view_based_focus_but_focus_was_enforced_using_FocusManager_then_it_is_not_aplied() {

        contextPath = URLUtils.buildUrl(contextPath, "form.jsf");

        Warp.initiate(openPage).inspect(new VerifyFocusEnforcingOverridesFocusSettings("form:input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));

        Warp.initiate(submit).inspect(new VerifyFocusEnforcingOverridesFocusSettings("form:input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));

        Warp.initiate(ajax).inspect(new VerifyFocusEnforcingOverridesFocusSettings("form:input2"));
        Graphene.waitGui().until(new ElementIsFocused(input2));
    }
View Full Code Here

TOP

Related Classes of org.richfaces.utils.focus.ElementIsFocused

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.