Example usage for org.openqa.selenium WebElement click

List of usage examples for org.openqa.selenium WebElement click

Introduction

In this page you can find the example usage for org.openqa.selenium WebElement click.

Prototype

void click();

Source Link

Document

Click this element.

Usage

From source file:bst.cpo.automation.dm.actions.Settings_Actions.java

public void My_Docs_Trash_Click() throws InterruptedException {
    //app1/cpo/#/settings/trash
    logThis("Nav: Settings > My Docs Trash");
    WebElement element = DMDriver.findElement(By.linkText("My Docs Trash"));
    element.click();
    Assert.assertTrue(homeAction.Get_Main_Header().contains("My docs trash"),
            "Failed - Navigation to Dashboard 'My docs trash'");
}

From source file:bst.cpo.automation.dm.actions.SystemOverview_Actions.java

public void Set_User(String strUser) {
    //<input type="text" ng-model="pp.query" maxlength="60" required="" class="ng-dirty ng-invalid ng-invalid-required">
    WebElement element = DMDriver
            .findElement(By.xpath("//*[@id='app']/div/div[4]/div/div/div[2]/div[1]/div[1]/form/input[1]"));
    element.click();
    element.clear();/*  w w  w  . j av  a 2  s. c  o  m*/
    element.sendKeys(strUser);
}

From source file:bst.cpo.automation.dm.actions.SystemOverview_Actions.java

public void Search_Click() {
    //<input type="submit" class="pure-button pure-button-primary new-folder-btn" ng-disabled="groupForm.$invalid" value="Save and create" disabled="disabled">
    if (Is_Enabled_Search_Button()) {
        WebElement element = DMDriver
                .findElement(By.xpath("//*[@id='app']/div/div[4]/div/div/div[2]/div[1]/div[1]/form/input[2]"));
        element.click();
    } else {//ww  w .j  a  v  a  2  s  . c  om
        logThis("Search_Click called and 'Search' button was not enabled.");
        Assert.fail("Search_Click called and 'Search' button was not enabled.");
    }
}

From source file:bst.cpo.automation.dm.actions.SystemOverview_Actions.java

public void Clear_Click() {
    //<input type="reset" class="pure-button" value="Clear" ng-click="resetSearch()">
    WebElement element = DMDriver
            .findElement(By.xpath("//*[@id='app']/div/div[4]/div/div/div[2]/div[1]/div[1]/form/input[3]"));
    element.click();
}

From source file:bst.cpo.automation.dm.actions.SystemOverview_Actions.java

public void License_Management_Click() {
    logThis("Clicking License Management Link (Not currently working in Alpha)");
    WebElement element = DMDriver.findElement(By.linkText("License Management"));
    element.click();
}

From source file:bst.cpo.automation.dm.actions.SystemOverview_Actions.java

public void User_Results_Email_Click(String strEmail) {
    logThis("Nav: Clicking email link '" + strEmail + "', opening properties panel.");
    WebElement element = DMDriver.findElement(By.linkText(strEmail));
    element.click();
}

From source file:bst.cpo.automation.dm.actions.SystemOverview_Actions.java

public void Close_Properties_Panel() {
    logThis("Closing the properties panel");
    WebElement element = DMDriver
            .findElement(By.xpath("//*[@id='app']/div/div[4]/div/div/div[2]/div[1]/div[5]/h2/i"));
    element.click();
}

From source file:Buildings.Building.java

public void upgrade() {

    village.getAcc().getDriver().get(village.getLink());
    village.getAcc().getDriver().get(link);

    try {//  ww  w.ja  v  a 2  s. co m
        WebElement element = village.getAcc().getDriver().findElement(By.id("contract"))
                .findElement(By.cssSelector("button[class='green build']"));
        element.click();
    } catch (Exception ex) {

    }
}

From source file:ca.nrc.cadc.UserStorageBrowserPage.java

License:Open Source License

public void clickButton(String promptText) throws Exception {
    WebElement button = find(xpath("//button[contains(text(),\"" + promptText + "\")]"));
    button.click();
}

From source file:ca.nrc.cadc.UserStorageBrowserPage.java

License:Open Source License

public void clickButtonWithClass(String promptText, String className) throws Exception {
    WebElement button = find(
            xpath("//button[contains(@class, '" + className + "') and contains(text(),'" + promptText + "')]"));
    button.click();
}