Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.Selenium.keyPress()


        selenium.keyUp("test_form:firstTabKeyUpInputID", "77");
        assertTrue(selenium.isTextPresent("onkeyup works"));
        assertTrue(selenium.isTextPresent("keyup"));

        //onkeypress
        selenium.keyPress("test_form:firstTabKeyPressInputID", "77");
        assertTrue(selenium.isTextPresent("onkeypress works"));
        assertTrue(selenium.isTextPresent("keypress"));

        //onselectionchange
        tabbedPane("test_form:onselectionchangeTabbedPaneID").tabSet().tabs().get(1).click();
View Full Code Here


        selenium.type("form:allPersons:nameColumn--search_field_o_auto_filter--searchComponent", "r");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        selenium.type("form:allPersons:professionColumn--search_field_o_auto_filter--searchComponent", "D");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        selenium.type("form:allPersons:hobbyColumn--drop_down_o_auto_filter--searchComponent::field", "a");
        selenium.keyPress("form:allPersons:hobbyColumn--drop_down_o_auto_filter--searchComponent::field", "\\13");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();

        selenium.click("link=Validation");
        waitForPageToLoad();
        selenium.click("link=Data Table");
View Full Code Here

    @Ignore
     @Test
    public void _testDataTableReRenderThroughA4J() {
        Selenium selenium = getSelenium();
        testAppFunctionalPage("/components/datatable/dataTable_a4j.jsf");
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
        selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "1");
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        String[] oldTableValues = new String[36];
        int j = 0;
View Full Code Here

    public void _testDataTableReRenderThroughA4J() {
        Selenium selenium = getSelenium();
        testAppFunctionalPage("/components/datatable/dataTable_a4j.jsf");
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
        selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "1");
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        String[] oldTableValues = new String[36];
        int j = 0;
        int n = 1;
        for (int i = 0; i < oldTableValues.length; i++) {
View Full Code Here

                n++;
            }
            if (i == 11 || i == 23) {
                j = 0;
                n = 1;
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
                if (i == 11) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "2");
                if (i == 23) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "3");
                OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
            }
View Full Code Here

                n = 1;
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
                if (i == 11) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "2");
                if (i == 23) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "3");
                OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
            }
        }
        selenium.click("formID:refresher");
        RichFacesAjaxLoadingMode.getInstance().waitForLoad();
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
View Full Code Here

                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
            }
        }
        selenium.click("formID:refresher");
        RichFacesAjaxLoadingMode.getInstance().waitForLoad();
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
        selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "1");
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        String[] newTableValues = new String[36];
        int k = 0;
View Full Code Here

        }
        selenium.click("formID:refresher");
        RichFacesAjaxLoadingMode.getInstance().waitForLoad();
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
        selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "1");
        selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        String[] newTableValues = new String[36];
        int k = 0;
        int m = 1;
        for (int i = 0; i < newTableValues.length; i++) {
View Full Code Here

                m++;
            }
            if (i == 11 || i == 23) {
                k = 0;
                m = 1;
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
                if (i == 11) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "2");
                if (i == 23) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "3");
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
                assertNoAlert("No alert expected, but was: ");
                OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
View Full Code Here

                k = 0;
                m = 1;
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\8");
                if (i == 11) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "2");
                if (i == 23) selenium.type("formID:dataTableID:dataTablePaginator_A4J--pageNo", "3");
                selenium.keyPress("formID:dataTableID:dataTablePaginator_A4J--pageNo", "\\13");
                assertNoAlert("No alert expected, but was: ");
                OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
                assertNoAlert("No alerts are expected when performing ajax request, but the following alert appeared: ");
            }
        }
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.