Package org.openqa.selenium

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


        WebElement insertAttachedImageMenu =
            container.findElement(By.xpath("//td[contains(@class, 'gwt-MenuItem') and . = 'Attached Image...']"));
        if (!isMenuEnabled(insertAttachedImageMenu)) {
            return null;
        }
        insertAttachedImageMenu.click();
        return new AttachedImageSelectPane().waitToLoad();
    }

    /**
     * @param menu a menu item
View Full Code Here


     */
    private void clickMenuWithLabel(String label)
    {
        WebElement menu =
            container.findElement(By.xpath("//td[contains(@class, 'gwt-MenuItem') and . = '" + label + "']"));
        menu.click();
    }
}
View Full Code Here

        for (WebElement cell : column) {
            if (cell.getText().equals(value)) {
                // Get the Subject element in the same row and look inside for a link.
                WebElement link = getUtil().findElementsWithoutWaiting(getDriver(),
                    getTable().getColumn("Subject").get(column.indexOf(cell)), By.tagName("a")).get(0);
                link.click();
                return null;
            }
            columnEntries.add(cell.getText());
        }
        throw new WebDriverException("Could not find message with " + column + " equal to "
View Full Code Here

    public void deleteProperty(String propertyName)
    {
        final By propertyLocator = By.id("xproperty_" + propertyName);
        final WebElement propertyContainer = getDriver().findElement(propertyLocator);
        WebElement deleteLink = propertyContainer.findElement(By.className("delete"));
        deleteLink.click();

        // Expect a confirmation box
        waitUntilElementIsVisible(By.className("xdialog-box-confirmation"));
        getDriver().findElement(By.cssSelector(".xdialog-box-confirmation input[value='Yes']")).click();
        waitUntilElementDisappears(propertyLocator);
View Full Code Here

    public void deleteObject(String className, int index)
    {
        final By objectLocator = By.id("xobject_" + className + "_" + index);
        final WebElement objectContainer = getDriver().findElement(objectLocator);
        WebElement deleteLink = objectContainer.findElement(By.className("delete"));
        deleteLink.click();

        // Expect a confirmation box
        waitUntilElementIsVisible(By.className("xdialog-box-confirmation"));
        getDriver().findElement(By.cssSelector(".xdialog-box-confirmation input[value='Yes']")).click();
        waitUntilElementDisappears(objectLocator);
View Full Code Here

    public void testDeletePageCanDoRedirect()
    {
        HomePage homePage = new HomePage();
        getUtil().gotoPage(SPACE_VALUE, PAGE_VALUE, DELETE_ACTION, "xredirect=" + homePage.getURL());
        WebElement yesButton = getDriver().findElement(By.xpath("//input[@value='yes']"));
        yesButton.click();
        Assert.assertTrue(homePage.isOnHomePage());
    }

    /**
     * Verify that hitting cancel on the delete confirmation dialog box goes back to the page being deleted.
View Full Code Here

        this.sectionPage.attachPackage(fileUrl);
        this.sectionPage.selectPackage(BACKUP_PACKAGE);

        WebElement importAsBackup = getDriver().findElement(By.name("importAsBackup"));
        importAsBackup.click();
        Assert.assertFalse(importAsBackup.isSelected());

        this.sectionPage.importPackage();

        ViewPage importedPage = this.sectionPage.clickImportedPage("Main.TestPage");
View Full Code Here

    {
        annotationsLabel.deleteAnnotationById(id);
        vp.waitUntilElementIsVisible(By.className("xnotification-done"));
        WebElement delete = getDriver().findElement(By.className("xnotification-done"));
        Assert.assertEquals(XWIKI_ANNOTATION_DELETE_SUCCESS, delete.getText());
        delete.click();
    }

    void deleteAnnotationByText(String annotatedText)
    {
        deleteAnnotationByID(this.annotationsLabel.getAnnotationIdByText(annotatedText));
View Full Code Here

        List<String> spacesToExclude = new ArrayList<String>();
        spacesToExclude.add(space);
        List<WebElement> existingTemplatesLinks = sectionPage.getExistingTemplatesLinks();
        for (int i = 0; i < existingTemplatesLinks.size(); i++) {
            WebElement link = existingTemplatesLinks.get(i);
            link.click();
            ViewPage templateViewPage = new ViewPage();
            templateViewPage.editInline();
            TemplateProviderInlinePage providerEditPage = new TemplateProviderInlinePage();
            providerEditPage.excludeSpaces(spacesToExclude);
            providerEditPage.clickSaveAndView();
View Full Code Here

    {
        WebElement brokenLink =
            getDriver().findElement(
                By.xpath("//span[@class='wikicreatelink']/a[contains(@href,'/create/" + spaceName + "/" + pageName
                    + "')]"));
        brokenLink.click();
        if (waitForTemplateDisplay) {
            // Ensure that the template choice popup is displayed. Since this is done using JS we need to wait till
            // it's displayed. For that we wait on the Create button since that would mean the template radio buttons
            // will all have been displayed.
            waitUntilElementIsVisible(By.xpath("//div[@class='modal-popup']//input[@type='submit']"));
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.