Esempio n. 1
0
  @AfterMethod(alwaysRun = true)
  public void Screenshots(ITestResult result) throws Exception {

    action.Screenshot(result, action);
    boolean Accept = action.isAlertPresent();
    action.alert(Accept);
  }
Esempio n. 2
0
 @Test(description = "enable of commit and cancel buttons", priority = 2)
 public void shutdownCommitCancelEnableBtn() throws Exception {
   // Click on the Edit button
   action.ClickButton(locator.getProperty("Edit"));
   boolean Accept = action.isAlertPresent();
   action.alert(Accept); // Verification of Commit and Cancel buttons should be enable
   action.VerifyEnableButton(locator.getProperty("Edit"));
   action.VerifyEnableButton(locator.getProperty("Done"));
   action.ClickButton(locator.getProperty("Commit"));
 }
 @Test(description = "Verify the staus is 'Unmanaged' after restore complete", priority = 2)
 public void Verify_Status_after_Restore() throws Exception {
   action.driver.navigate().refresh();
   // Click on Inventory,Manage Elements
   action.ClickLink(locator.getProperty("Inventory"));
   action.WaitForTitle(locator.getProperty("Inventory"));
   action.ClickLink(locator.getProperty("Manage_Elements"));
   action.WaitForTitle(locator.getProperty("Manage_Elements"));
   action.VerifyTitle(locator.getProperty("Manage_Elements"));
   action.SwithchFrame("iframe0");
   Thread.sleep(2000);
   action.driver.switchTo().frame("appTableIframe");
   Thread.sleep(2000);
   // Select CM Element
   setup.SelectCMElement(action, input.getProperty("cm29"));
   Thread.sleep(1000);
   WebDriverWait wait = new WebDriverWait(action.driver, 60);
   wait.until(
       ExpectedConditions.elementToBeClickable(By.xpath(locator.getProperty("Currentstatus"))));
   // Click on Get current status button
   action.ClickButton(locator.getProperty("Currentstatus"));
   action.WaitForTitle(locator.getProperty("Manage_Elements"));
   Thread.sleep(90000);
   // Verify the status
   action.VerifyElementValue(locator.getProperty("Mangedby"), "Primary");
   Thread.sleep(2000);
 }
 @Test(description = "Manage CM Element in primary", priority = 3)
 public void Manage_CM() throws Exception {
   action.driver.navigate().refresh();
   // Click on Inventory,Manage Elements
   action.ClickLink(locator.getProperty("Inventory"));
   action.WaitForTitle(locator.getProperty("Inventory"));
   action.ClickLink(locator.getProperty("Manage_Elements"));
   action.WaitForTitle(locator.getProperty("Manage_Elements"));
   action.VerifyTitle(locator.getProperty("Manage_Elements"));
   action.SwithchFrame("iframe0");
   Thread.sleep(2000);
   action.driver.switchTo().frame("appTableIframe");
   Thread.sleep(2000);
   // Select the CM Element
   setup.SelectCMElement(action, input.getProperty("cm29"));
   Thread.sleep(1000);
   // Click on More button
   action.ClickButton(locator.getProperty("Users.More"));
   Thread.sleep(1000);
   // Select manage link
   action.ClickLink(locator.getProperty("Manage"));
   Thread.sleep(60000);
   action.VerifyElementValue(locator.getProperty("Mangedby"), "Primary");
   Thread.sleep(2000);
 }
Esempio n. 5
0
 @Test(priority = 3)
 public void VerifyAssignedUpr() throws Exception {
   action.driver.navigate().refresh();
   // Click on tenant Management Link
   action.ClickLink(locator.getProperty("Tenant_Management"));
   action.WaitForTitle(locator.getProperty("Multi-Tenancy_Management"));
   action.VerifyTitle(locator.getProperty("Multi-Tenancy_Management"));
   action.SwithchFrame("iframe0");
   action.ClickElement(locator.getProperty("Tenanttree3"));
   Thread.sleep(1000);
   action.ClickLink(input.getProperty("site1"));
   action.ClickLink(locator.getProperty("User_Provisioning_Rule"));
   action.ClickButton(locator.getProperty("Tenantedit"));
   Thread.sleep(2000);
   action.VerifyElementValue(locator.getProperty("TassignedUpr"), input.getProperty("TUpr"));
 }
Esempio n. 6
0
 @BeforeClass(alwaysRun = true)
 public void setup() throws IOException, InterruptedException {
   action = new UserAction();
   locator = new Properties();
   input = new Properties();
   locator.load(
       new FileInputStream(
           System.getProperty("user.dir") + "\\Third Party\\objectRepository\\OR.properties"));
   input.load(
       new FileInputStream(
           System.getProperty("user.dir") + "\\Third Party\\testData\\INPUT.properties"));
   action.login(input.getProperty("UserId"), input.getProperty("Password"), action);
 }
Esempio n. 7
0
 @Test(description = "Enable of Edit and Done buttons", priority = 1)
 public void shutdownEditDoneEnableBtn() throws Exception {
   // Edit and Done buttons are enabled
   action.VerifyEnableButton(locator.getProperty("Edit"));
   action.VerifyEnableButton(locator.getProperty("Done"));
 }
Esempio n. 8
0
  @Test(priority = 2)
  public void AssignUpr() throws Exception {
    action.driver.navigate().refresh();
    // Click on tenant Management Link
    action.ClickLink(locator.getProperty("Tenant_Management"));
    action.WaitForTitle(locator.getProperty("Multi-Tenancy_Management"));
    action.VerifyTitle(locator.getProperty("Multi-Tenancy_Management"));
    action.SwithchFrame("iframe0");
    action.ClickElement(locator.getProperty("Tenanttree3"));
    Thread.sleep(1000);
    action.ClickLink(input.getProperty("site1"));
    action.ClickLink(locator.getProperty("User_Provisioning_Rule"));
    action.ClickButton(locator.getProperty("Tenantedit"));
    Thread.sleep(1000);
    // Select the Upr From table
    action.ClickButton(locator.getProperty("Tenantuprbtn0"));
    Thread.sleep(1000);
    // Click on Commit button
    action.ClickButton(locator.getProperty("Commit"));
    Thread.sleep(1000);

    action.WaitForTitle(locator.getProperty("Multi-Tenancy_Management"));
    action.VerifyTitle(locator.getProperty("Multi-Tenancy_Management"));
    Thread.sleep(2000);
    action.VerifyStringValue(
        "site1 is updated successfully. Refresh the tree to see updated node.");
  }
Esempio n. 9
0
 @Test(priority = 1)
 public void createUpr() throws Exception {
   action.driver.navigate().refresh();
   // Click on User Provisioning Rule
   action.ClickLink(locator.getProperty("User_Provisioning_Rule"));
   action.WaitForTitle(locator.getProperty("User_Provisioning_Rules"));
   action.VerifyTitle(locator.getProperty("User_Provisioning_Rules"));
   action.SwithchFrame("iframe0");
   // Click on New Button
   action.ClickButton(locator.getProperty("Users.New"));
   action.WaitForTitle(locator.getProperty("New_User_Provisioning_Rule"));
   action.VerifyTitle(locator.getProperty("New_User_Provisioning_Rule"));
   // Fill up the required fields of Upr
   Thread.sleep(3000);
   action.entertext(locator.getProperty("Uprname"), input.getProperty("TUpr"));
   Thread.sleep(1000);
   action.SelectFromdropDown(locator.getProperty("LangDropdown"), input.getProperty("Danish"));
   action.SelectFromdropDown(locator.getProperty("TimeDropdown"), input.getProperty("Danishtime"));
   // Click on Commit Button and Verify the title of the page
   action.ClickButton(locator.getProperty("Commit"));
   action.WaitForTitle(locator.getProperty("User_Provisioning_Rules"));
   action.VerifyTitle(locator.getProperty("User_Provisioning_Rules"));
   usetup.VerifyUprname(action, input.getProperty("TUpr"));
 }
Esempio n. 10
0
 @AfterClass(alwaysRun = true)
 public void Close() throws IOException, InterruptedException {
   action.logout(action);
 }
Esempio n. 11
0
  @AfterMethod(alwaysRun = true)
  public void Screenshots(ITestResult result) throws IOException, InterruptedException {

    action.Screenshot(result, action);
  }
Esempio n. 12
0
 @Test(
     description = "Verify that the error message should display when Grace period field is empty",
     priority = 3)
 public void ShutdownAutoError() throws Exception {
   action.ClickButton(locator.getProperty("Edit"));
   Accept = action.isAlertPresent();
   action.alert(Accept);
   action.WaitForTitle(locator.getProperty("Edit_Profile"));
   // update the value
   action.ClearText(locator.getProperty("Shutdown.GracePer"));
   action.ClickButton(locator.getProperty("Commit"));
   boolean Accept = action.isAlertPresent();
   action.alert(Accept);
   action.WaitForObj(locator.getProperty("Shutdown.GracePer.msg"));
   action.VerifyElementValue(
       locator.getProperty("Shutdown.GracePer.msg"),
       locator.getProperty("Integer_value_is_out_of_range"));
   action.ClickButton(locator.getProperty("Cancel"));
 }
Esempio n. 13
0
 @Test(description = "verify that the title value", priority = 3)
 public void shutdownTitle() throws Exception {
   action.VerifyStringValue(locator.getProperty("Shutdown"));
 }
  @Test(description = "Restore Secondary server to primary", priority = 1)
  public void Restore() throws Exception {

    // Navigate to Geographic_Redundancy
    action.ClickLink(locator.getProperty("Geographic_Redundancy"));
    action.WaitForTitle(locator.getProperty("Geographic_Redundancy"));
    action.SwithchFrame("iframe0");
    // Click on Restore button
    action.ClickButton(locator.getProperty("GeoRestore"));
    Thread.sleep(3000);
    // Focus on Popup window
    WebElement Details = action.driver.findElement(By.xpath(locator.getProperty("RecoveryWindow")));
    Details.sendKeys(org.openqa.selenium.Keys.CONTROL);
    // Click on Recondary sever button
    action.ClickButton(locator.getProperty("RecoverSecondary"));
    WebElement recovercnfm =
        action.driver.findElement(By.xpath(locator.getProperty("RecoveryWindowcnfrm")));
    recovercnfm.sendKeys(org.openqa.selenium.Keys.CONTROL);
    // Click on OK button to confirm
    action.ClickButton(locator.getProperty("Restorecnfrm"));
    // Wait for some time to handle pop up
    Thread.sleep(550000);
    // handle alert
    if (action.isAlertPresent()) {
      action.driver.switchTo().alert();
      action.driver.switchTo().alert().accept();
    }
    // Wait for 15 minutes
    action.RefreshPage();
    Thread.sleep(150000);
    action.RefreshPage();
    WebDriverWait wait = new WebDriverWait(action.driver, 240000);
    wait.until(ExpectedConditions.titleContains(locator.getProperty("System_Manager")));
    action.RefreshPage();
    Thread.sleep(1000);
    WebElement ele = action.driver.findElement(By.xpath(locator.getProperty("ErrorBox")));
    while (ele.isDisplayed()) {
      action.RefreshPage();
      Thread.sleep(60000);
    }

    action.driver.quit();
    action.login(input.getProperty("UserId"), input.getProperty("Password"), action);
    Thread.sleep(1000);
    action.RefreshPage();
  }
 @AfterClass
 public void Close() throws IOException, InterruptedException {
   action.logout(action);
 }
Esempio n. 16
0
 @Test(
     description =
         "Verify that the values are successfully change/override by an administrator and attribute successfully saved",
     groups = {"Sanity"})
 public void ShutdownUpdate() throws Exception {
   action.RefreshPage();
   // Navigate to Configuration page, setting,SMGR, shutdown
   action.ClickLink(locator.getProperty("Configurations"));
   action.ClickLink(locator.getProperty("Settings"));
   action.ClickLink(locator.getProperty("SMGR"));
   action.ClickLink(locator.getProperty("Shutdown"));
   action.SwithchFrame("iframe0");
   action.ClickButton(locator.getProperty("Edit"));
   Accept = action.isAlertPresent();
   action.alert(Accept);
   action.WaitForTitle(locator.getProperty("Edit_Profile"));
   // update the value
   action.ClearText(locator.getProperty("Shutdown.GracePer"));
   // action.WaitForTitle(locator.getProperty("Edit_Profile"));
   action.ClearText(locator.getProperty("Shutdown.GracePer"));
   action.entertext(locator.getProperty("Shutdown.GracePer"), input.getProperty("number1"));
   // Verify that the values are successfully change/override by an administrator and attribute
   // successfully saved
   action.ClickButton(locator.getProperty("Commit"));
   Thread.sleep(2000);
   Accept = action.isAlertPresent();
   action.alert(Accept);
   action.VerifyElementValue(
       locator.getProperty("Shutdown.GracePer"), input.getProperty("number1"));
   Accept = action.isAlertPresent();
   action.alert(Accept);
 }
 @Test(description = "Verify the Edit department operation of tenant")
 public void EditDept() throws Exception {
   action.driver.navigate().refresh();
   // Click on tenant Management Link
   action.ClickLink(locator.getProperty("Tenant_Management"));
   action.WaitForTitle(locator.getProperty("Multi-Tenancy_Management"));
   action.VerifyTitle(locator.getProperty("Multi-Tenancy_Management"));
   action.SwithchFrame("iframe0");
   action.ClickElement(locator.getProperty("Tenanttree3"));
   Thread.sleep(1000);
   action.ClickElement(locator.getProperty("Tenanttree4"));
   Thread.sleep(1000);
   // Click on Department
   action.ClickLink(input.getProperty("Dept1"));
   Thread.sleep(2000);
   // Click on Edit button
   action.ClickButton(locator.getProperty("Tenantedit"));
   // Edit the department and click on edit button
   action.ClearText(locator.getProperty("deptdesc"));
   action.entertext(locator.getProperty("deptdesc"), "Department");
   action.ClickButton(locator.getProperty("Tenantadd"));
   action.WaitForTitle(locator.getProperty("Multi-Tenancy_Management"));
   action.VerifyTitle(locator.getProperty("Multi-Tenancy_Management"));
   Thread.sleep(2000);
   action.VerifyStringValue(
       "Dept1 is updated successfully. Refresh the tree to see updated node.");
 }