/**
   * Simple user actions to log into DM. User and password strings passed in. Can be used for
   * regular and BA users.
   */
  public void BasicUser_Login(String user_Login, String user_Password) throws Exception {
    logThis("Attempting to log in user: "******"dnn_ctr660_CustomLogin_View_txtUsername"));
    user.click();
    user.clear();
    user.sendKeys(user_Login);

    WebElement pwd = DMDriver.findElement(By.id("dnn_ctr660_CustomLogin_View_txtPassword"));
    pwd.click();
    pwd.clear();
    pwd.sendKeys(user_Password);

    WebElement login = DMDriver.findElement(By.id("dnn_ctr660_CustomLogin_View_cmdLogin"));
    login.click();
    Thread.sleep(1000);
  }
 public String Get_Files_Selected() {
   // both of these work.
   WebElement element =
       DMDriver.findElement(
           By.xpath("//*[@id='app']/div/div[4]/div/div/div[2]/div[1]/div[2]/span"));
   // WebElement element = DMDriver.findElement(By.className("txt"));
   return element.getText().trim();
   // return "WARNING: not yet functional...";
 }
  public void Select_All() {
    // <input type="checkbox" ng-change="selectCurrentPage(pp.selectedAll)"
    // ng-model="pp.selectedAll" class="ng-pristine ng-valid">

    WebElement element =
        DMDriver.findElement(
            By.xpath(
                "//*[@id='app']/div/div[4]/div/div/div[2]/div[1]/div[1]/table/thead/tr/th[1]/label/input"));
    element.click();
  }
 /**
  * Determine is the login was a success or not. If the login was a success, the element we use for
  * validation is not shown. Test if element exist before looking for LOGIN FAILED.
  */
 public Boolean Is_Bad_Login() {
   // TODO - See if URL is a better way to determine login failure/success
   // or use it in combination.
   if (reusableActions.Exists_Element_By_Id(
       "dnn_ctr660_CustomLogin_View_ctlMessageDialog", "Div MessageDialog")) {
     WebElement contentwrapper =
         DMDriver.findElement(By.id("dnn_ctr660_CustomLogin_View_ctlMessageDialog"));
     if (contentwrapper.getText().contains("LOGIN FAILED")) {
       return true;
     }
     return false;
   }
   return false;
 }
 /** This is a quick and crude way to get past the Nuxeo screen in Dev environment */
 public void Nuxeo_CPO_Bypass() throws InterruptedException {
   logThis("Applying Nuxeo CPO bypass");
   WebElement logoutLink = DMDriver.findElement(By.linkText("CPO"));
   logoutLink.click();
 }
 public void User_Logout() throws InterruptedException {
   WebElement userLoggedIn = DMDriver.findElement(ng.binding("displayName"));
   logThis("Attempting to Sign Out user: "******"Sign Out"));
   logoutLink.click();
 }
 public String Get_Trash_Text() {
   WebElement element = DMDriver.findElement(By.className("trash-settings-content-wrapper"));
   return element.getText();
 }