Examples of WebElement


Examples of org.openqa.selenium.WebElement

        return this.commentAuthor.getAttribute("value");
    }

    public boolean isCommentFormShown()
    {
        WebElement commentForm = getDriver().findElement(
            By.xpath("//form[@id='AddComment']/fieldset[@id='commentform']"));
        return commentForm.isDisplayed();
    }
View Full Code Here

Examples of org.openqa.selenium.WebElement

        saveAnnotation();
    }

    public void simulateCTRL_M()
    {
        WebElement body = getDriver().findElement(By.id("body"));
        body.sendKeys(Keys.CONTROL, "m");
    }
View Full Code Here

Examples of org.openqa.selenium.WebElement

    /**
     * Toggles visible/invisible the Annotations Tab.
     */
    public void toggleAnnotationsPane()
    {
        WebElement annotationsPane = getDriver().findElement(By.xpath("//div[@id='tmAnnotations']//a[@class='tme']"));
        annotationsPane.click();
        if (this.isVisible == true) {
            this.isVisible = false;
        }
        if (this.isVisible == false) {
            this.isVisible = true;
View Full Code Here

Examples of org.openqa.selenium.WebElement

    {
        if (this.isVisible == false) {
            Assert.fail("Annotation Pane is hidden");
        }
        waitUntilElementIsVisible(By.className("annotationsettings"));
        WebElement checkBox = getDriver().findElement(By.id("annotationsdisplay"));
        if (checkBox.isSelected() == false) {
            checkBox.click();
        }
    }
View Full Code Here

Examples of org.openqa.selenium.WebElement

    {
        if (this.isVisible == false) {
            Assert.fail("Annotation Pane is hidden");
        }
        waitUntilElementIsVisible(By.className("annotationsettings"));
        WebElement checkBox = getDriver().findElement(By.id("annotationsdisplay"));
        if (checkBox.isSelected() == true) {
            checkBox.click();
        }
    }
View Full Code Here

Examples of org.openqa.selenium.WebElement

        } catch (NoSuchElementException e) {
            commentVersionXPath = By.xpath(".//td[4]");
        }
        for (WebElement tableEntry : tableEntries) {
            try {
                WebElement cell = tableEntry.findElement(commentVersionXPath);
                if (cell.getText().trim().contentEquals(summary)) {
                    return true;
                }
            } catch (NoSuchElementException e) {
                // Ignore, better luck next time.
            }
View Full Code Here

Examples of org.openqa.selenium.WebElement

    }

    public State getGuestRight(Right right)
    {
        final By iconLocator = By.xpath("//tr[@id='unregistered']/td[" + right.getColumnIndex() + "]/img");
        final WebElement icon = getDriver().findElement(iconLocator);
        return State.getButtonState(icon);
    }
View Full Code Here

Examples of org.openqa.selenium.WebElement

    public State getRight(String entityName, Right right)
    {
        final By iconLocator =
            By.xpath("//*[@id='usersandgroupstable-display']//td[@class='username']/a[contains(@href, '" + entityName
                + "')]/../../td[" + right.getColumnIndex() + "]/img");
        final WebElement icon = getDriver().findElement(iconLocator);
        return State.getButtonState(icon);
    }
View Full Code Here

Examples of org.openqa.selenium.WebElement

    public void clickGuestRight(Right right)
    {
        try {
            executeJavascript("window.__oldConfirm = window.confirm; window.confirm = function() { return true; };");
            final By buttonLocator = By.xpath("*//tr[@id='unregistered']/td[" + right.getColumnIndex() + "]/img");
            final WebElement button = getDriver().findElement(buttonLocator);
            State currentState = State.getButtonState(button);
            button.click();
            // Note: Selenium 2.0a4 returns a relative URL when calling getAttribute("src") but since we moved to
            // Selenium 2.0a7 it returns a *full* URL even though the DOM has a relative URL as in:
            // <img src="/xwiki/resources/js/xwiki/usersandgroups/img/allow.png">
            waitUntilElementEndsWithAttributeValue(buttonLocator, "src", currentState.getNextState().imageURL);
        } finally {
View Full Code Here

Examples of org.openqa.selenium.WebElement

        try {
            executeJavascript("window.__oldConfirm = window.confirm; window.confirm = function() { return true; };");
            final By buttonLocator =
                By.xpath("//*[@id='usersandgroupstable-display']//td[@class='username']/a[contains(@href, '"
                    + entityName + "')]/../../td[" + right.getColumnIndex() + "]/img");
            final WebElement button = getDriver().findElement(buttonLocator);
            State currentState = State.getButtonState(button).getNextState();
            button.click();
            // Note: Selenium 2.0a4 returns a relative URL when calling getAttribute("src") but since we moved to
            // Selenium 2.0a7 it returns a *full* URL even though the DOM has a relative URL as in:
            // <img src="/xwiki/resources/js/xwiki/usersandgroups/img/allow.png">
            waitUntilElementEndsWithAttributeValue(buttonLocator, "src", currentState.imageURL);
        } finally {
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.