Package com.thoughtworks.selenium

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


        //try to type in details
        assertEquals("Details input", selenium.getText("form:detailsInputID"));
        selenium.type("form:detailsInputID", "Test ");
        assertEquals("Test Details input", selenium.getText("form:detailsInputID"));

        selenium.click("form:confirm_withInputTextInside::yes_button");
        assertTrue(isAlertPresent());
        assertEquals("Done", getAlert());
        acceptAlert();
    }
View Full Code Here


     @Test
    public void _testConfirmationClientSideEvents() {
        testAppFunctionalPage("/components/confirmation/confirmation.jsf");
        Selenium selenium = getSelenium();
        // onclick event
        selenium.click("onclickInvoker1");
        confirmation("fn:onclick_conf").okButton().click();
        assertTrue(selenium.isTextPresent("onclick action"));
        assertTrue(selenium.isTextPresent("onclick works"));
        assertTrue(selenium.isTextPresent("click"));
View Full Code Here

        assertTrue(selenium.isTextPresent("onclick action"));
        assertTrue(selenium.isTextPresent("onclick works"));
        assertTrue(selenium.isTextPresent("click"));

        // ondblclick
        selenium.click("ondblclick");
        selenium.doubleClick("fn:ondblclick_conf");
        confirmation("fn:ondblclick_conf").okButton().click();
        assertTrue(selenium.isTextPresent("ondblclick action"));
        assertTrue(selenium.isTextPresent("ondblclick works"));
        assertTrue(selenium.isTextPresent("dblclick"));
View Full Code Here

        assertTrue(selenium.isTextPresent("ondblclick action"));
        assertTrue(selenium.isTextPresent("ondblclick works"));
        assertTrue(selenium.isTextPresent("dblclick"));

        // onmousedown
        selenium.click("onmousedown");
        selenium.mouseDown("fn:onmousedown_conf");
        confirmation("fn:onmousedown_conf").okButton().click();
        assertTrue(selenium.isTextPresent("onmousedown action"));
        assertTrue(selenium.isTextPresent("onmousedown works"));
        assertTrue(selenium.isTextPresent("mousedown"));
View Full Code Here

        assertTrue(selenium.isTextPresent("onmousedown action"));
        assertTrue(selenium.isTextPresent("onmousedown works"));
        assertTrue(selenium.isTextPresent("mousedown"));

        // onmouseover
        selenium.click("onmouseover");
        selenium.mouseOver("fn:onmouseover_conf");
        confirmation("fn:onmouseover_conf").okButton().click();
        assertTrue(selenium.isTextPresent("onmouseover action"));
        assertTrue(selenium.isTextPresent("onmouseover works"));
        assertTrue(selenium.isTextPresent("mouseover"));
View Full Code Here

        assertTrue(selenium.isTextPresent("onmouseover action"));
        assertTrue(selenium.isTextPresent("onmouseover works"));
        assertTrue(selenium.isTextPresent("mouseover"));

        // onmouseup
        selenium.click("onmouseup");
        selenium.mouseUp("fn:onmouseup_conf");
        confirmation("fn:onmouseup_conf").okButton().click();
        assertTrue(selenium.isTextPresent("onmouseup action"));
        assertTrue(selenium.isTextPresent("onmouseup works"));
        assertTrue(selenium.isTextPresent("mouseup"));
View Full Code Here

        assertTrue(selenium.isTextPresent("onmouseup action"));
        assertTrue(selenium.isTextPresent("onmouseup works"));
        assertTrue(selenium.isTextPresent("mouseup"));

        // onmouseout
        selenium.click("onmouseout");
        selenium.mouseOut("fn:onmouseout_conf");
        confirmation("fn:onmouseout_conf").okButton().click();
        assertTrue(selenium.isTextPresent("onmouseout action"));
        assertTrue(selenium.isTextPresent("onmouseout works"));
        assertTrue(selenium.isTextPresent("mouseout"));
View Full Code Here

        assertTrue(selenium.isTextPresent("onmouseout action"));
        assertTrue(selenium.isTextPresent("onmouseout works"));
        assertTrue(selenium.isTextPresent("mouseout"));

        // onmousemove
        selenium.click("onmousemove");
        selenium.mouseMove("fn:onmousemove_conf");
        confirmation("fn:onmousemove_conf").okButton().click();
        assertTrue(selenium.isTextPresent("onmousemove action"));
        assertTrue(selenium.isTextPresent("onmousemove works"));
        assertTrue(selenium.isTextPresent("mousemove"));
View Full Code Here

     @Test
    public void testReRenderThroughA4J() {
        testAppFunctionalPage("/components/chart/chart_a4j.jsf");
        Selenium selenium = getSelenium();
        String oldValue = selenium.getHtmlSource();
        selenium.click("formID:refresher");
        RichFacesAjaxLoadingMode.getInstance().waitForLoad();
        String newValue = selenium.getHtmlSource();
        assertFalse(newValue.equals(oldValue));
    }
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.