Package org.openqa.selenium

Examples of org.openqa.selenium.WebElement.click()


        openIdLogin.submit();
    }

    public void logout() {
        final WebElement logoutLink = findElement(By.linkText("Logout"));
        logoutLink.click();
    }

    public void clickLink(WebElement linkToClick) {
        //TODO Should make sure this is clickable.
        linkToClick.click();
View Full Code Here


    }

    protected WebElement switchToEditorActiveArea() {
        browser.switchTo().frame(advanced().getFrameElement());
        WebElement activeArea = browser.findElement(By.tagName("body"));
        activeArea.click();
        return activeArea;
    }

    @Override
    public void type(String text) {
View Full Code Here

        return Integer.valueOf(advanced().getActivePageElement().getText());
    }

    private void switchTo(By by) {
        WebElement element = advanced().getRootElement().findElement(by);
        element.click();
        Graphene.waitModel().until().element(element).attribute("class").contains(advanced().getActiveClass());
    }

    private boolean checkIfScrollingByFastButtonIsQuickerThanScrollingByPages(int pageNumberBefore) {
        return Math.abs(pageNumberBefore - getActivePageNumber()) > (int) (advanced().getCountOfVisiblePages() / 2);
View Full Code Here

        advanced().show();
        WebElement item = picker.pick(advanced().getMenuItemElements());
        if (item == null) {
            throw new IllegalArgumentException("There is no such option to be selected, which satisfied the given rules!");
        }
        item.click();
    }

    @Override
    public void selectItem(String header) {
        selectItem(ChoicePickerHelper.byVisibleText().match(header));
View Full Code Here

    private void selectTreeNodeByCaption(String string) {
        WebElement e = $(TreeElement.class).first().findElement(
                By.xpath("//div[@class='v-tree-node-caption']//span[text()='"
                        + string + "']"));
        e.click();
    }

    @Test
    public void tables() throws Exception {
        openTestURL("test");
View Full Code Here

        WebElement cb = $(CheckBoxElement.class).caption(caption).first()
                .findElement(By.xpath("input"));
        if (BrowserUtil.isChrome(getDesiredCapabilities())) {
            testBenchElement(cb).click(0, 0);
        } else {
            cb.click();
        }
    }

    @Test
    public void tabsAlignCenter() throws Exception {
View Full Code Here

    public void testLeftColumnAlignment() throws Exception {
        openTestURL();

        // Do align columns to the left
        WebElement webElement = driver.findElement(By.className("v-button"));
        webElement.click();

        Assert.assertTrue("Table caption is not aligned to the left",
                isElementPresent(By
                        .className("v-table-caption-container-align-left")));
View Full Code Here

        waitGui().until().element(secondItem).attribute("class").contains("rf-au-itm-sel");
        assertTrue(suggestionList.isDisplayed());
        assertEquals(4, autocompleteItems.size());
        assertEquals("t,", autocompleteInput.getAttribute("value"));

        secondItem.click();
        waitGui().until().element(suggestionList).is().not().visible();
        assertEquals("t,New York", autocompleteInput.getAttribute("value"));

        autocompleteInput.sendKeys(", ");
        waitGui().until().element(suggestionList).is().visible();
View Full Code Here

        waitGui().until().element(thirdItem).attribute("class").contains("rf-au-itm-sel");
        assertTrue(suggestionList.isDisplayed());
        assertEquals(4, autocompleteItems.size());
        assertEquals("t,New York, ", autocompleteInput.getAttribute("value"));

        thirdItem.click();
        waitGui().until().element(suggestionList).is().not().visible();
        assertEquals("t,New York, San Francisco", autocompleteInput.getAttribute("value"));
    }

    @Test
View Full Code Here

        actions.moveToElement(secondItem).perform();
        waitGui().until().element(autocompleteInput).attribute("value").equalTo("t,New York");
        assertTrue(suggestionList.isDisplayed());
        assertEquals(4, autocompleteItems.size());

        secondItem.click();
        waitGui().until().element(suggestionList).is().not().visible();
        assertEquals("t,New York", autocompleteInput.getAttribute("value"));

        actions.moveToElement(autocompleteInput).perform();
        autocompleteInput.sendKeys(", ");
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.