Package com.thoughtworks.selenium

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


        assertTrue(selenium.getText("fn:firstItem_firstContent").equals("Some text on the first tab"));
        selenium.click("fn:firstItem_secondHeader");
        waitForPageToLoad();
        assertTrue(selenium.getText("fn:firstItem_secondContent").equals("Some text on the second tab"));

        selenium.click("fn:secondHeader");
        waitForPageToLoad();
        assertTrue(selenium.isElementPresent("fn:secondItem"));
        assertTrue(selenium.isVisible("fn:secondItem"));
        assertTrue(selenium.getText("fn:secondItem_firstHeader").equals("First tab"));
        assertTrue(selenium.getText("fn:secondItem_secondHeader").equals("Second tab"));
View Full Code Here


        assertTrue(selenium.isElementPresent("fn:secondItem"));
        assertTrue(selenium.isVisible("fn:secondItem"));
        assertTrue(selenium.getText("fn:secondItem_firstHeader").equals("First tab"));
        assertTrue(selenium.getText("fn:secondItem_secondHeader").equals("Second tab"));
        assertTrue(selenium.getText("fn:secondItem_firstContent").equals("Some text on the first tab"));
        selenium.click("fn:secondItem_secondHeader");
        waitForPageToLoad();
        assertTrue(selenium.getText("fn:secondItem_secondContent").equals("Some text on the second tab"));
    }

     @Test
View Full Code Here

    public void _testTabbedPaneClientSideEvents() {
        Selenium selenium = getSelenium();
        testAppFunctionalPage("/components/tabbedpane/tabbedPane.jsf");

        //onclick
        selenium.click("test_form:onclickTabbedPaneID");
        assertTrue(selenium.isTextPresent("onclick works"));
        assertTrue(selenium.isTextPresent("click"));

        //ondblclick
        selenium.doubleClick("test_form:ondblclickTabbedPaneID");
View Full Code Here

        firstDataTable.makeAndCheckSingleSelection(1, 1);
        firstDataTable.column(0).makeSorting();
        dataTablePaginator("fn:firstDataTableID:firstPaginator").makePagination(3);
        firstDataTable.column(1).filter(DropDownFieldFilterInspector.class, "fn:firstDataTableID:filter1").makeFiltering("col2_row1");
        selenium.click("fn:secondTabID");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        secondDataTable.assertElementExists(false);
        secondDataTable.assertVisible(false);
        secondDataTable.makeAndCheckSingleSelection(0, 1);
        secondDataTable.column(2).makeSorting();
View Full Code Here

        assertTrue(selenium.getText("fn:firstHeader").equals("First tab"));
        assertTrue(selenium.getText("fn:secondHeader").equals("Second tab"));
        assertTrue(selenium.getText("fn:firstItem_firstHeader").equals("First tab"));
        assertTrue(selenium.getText("fn:firstItem_secondHeader").equals("Second tab"));
        assertTrue(selenium.getText("fn:firstItem_firstContent").equals("Some text on the first tab"));
        selenium.click("fn:firstItem_secondHeader");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        assertTrue(selenium.getText("fn:firstItem_secondContent").equals("Some text on the second tab"));

        selenium.click("fn:secondHeader");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
View Full Code Here

        assertTrue(selenium.getText("fn:firstItem_firstContent").equals("Some text on the first tab"));
        selenium.click("fn:firstItem_secondHeader");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        assertTrue(selenium.getText("fn:firstItem_secondContent").equals("Some text on the second tab"));

        selenium.click("fn:secondHeader");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        assertTrue(selenium.isElementPresent("fn:secondItem"));
        assertTrue(selenium.isVisible("fn:secondItem"));
        assertTrue(selenium.getText("fn:secondItem_firstHeader").equals("First tab"));
        assertTrue(selenium.getText("fn:secondItem_secondHeader").equals("Second tab"));
View Full Code Here

        assertTrue(selenium.isElementPresent("fn:secondItem"));
        assertTrue(selenium.isVisible("fn:secondItem"));
        assertTrue(selenium.getText("fn:secondItem_firstHeader").equals("First tab"));
        assertTrue(selenium.getText("fn:secondItem_secondHeader").equals("Second tab"));
        assertTrue(selenium.getText("fn:secondItem_firstContent").equals("Some text on the first tab"));
        selenium.click("fn:secondItem_secondHeader");
        OpenFacesAjaxLoadingMode.getInstance().waitForLoad();
        assertTrue(selenium.getText("fn:secondItem_secondContent").equals("Some text on the second tab"));
    }

     @Test
View Full Code Here

    public void testHintLabelClientSideEvents() {
        Selenium selenium = getSelenium();
        testAppFunctionalPage("/components/hintlabel/hintLabel.jsf");

        //onclick
        selenium.click("formID:clickID");
        assertTrue(selenium.isTextPresent("onclick works"));
        assertTrue(selenium.isTextPresent("click"));

        //ondblclick
        selenium.doubleClick("formID:doubleclickID");
View Full Code Here

     @Test
    public void testReRenderThroughA4J() {
        Selenium selenium = getSelenium();
        testAppFunctionalPage("/components/dynamicimage/dynamicImage_a4j.jsf");
        String oldValue = selenium.getHtmlSource();
        selenium.click("formID:refresher");
        RichFacesAjaxLoadingMode.getInstance().waitForLoad();
        String newValue = selenium.getHtmlSource();
        assertFalse(newValue.equals(oldValue));
    }
View Full Code Here

    public void disabledTestFPClientValidation() throws Exception {
        Selenium selenium = getSelenium();
        testAppFunctionalPage("/components/foldingpanel/foldingPanelAjax.jsf");
        foldingPanel("form1:fp1").toggle().clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
        selenium.type("form1:input1", "");
        selenium.click("form1:sumbitForm1");
        assertTrue(selenium.isTextPresent("\"input1\": Value is required."));
        assertTrue(selenium.isTextPresent("Validation Error"));
    }

    //JSFC-1954
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.