Beispiel #1
0
 public void IsActiveUserTrueTest(String searchtext, IWebElement email, string value)
 {
     DriverUtils.LaunchBrowser("http://cos-test.psr.rd.hpicorp.net/COSWeb/ManageUser/UserManagement");
     Console.WriteLine("In Manage Users Page");
     SearchTextBox.EnterText(searchtext);
     if (ManageUsersTableRow.Text.Contains("true"))
     {
         Console.WriteLine("User is active");
         EditUserBtn.Click();
         UserEmailTextBox.EnterText(value);
         SaveUserBtn.Click();
         Thread.Sleep(5000);
         Common.ExtentReport.test.Log(AventStack.ExtentReports.Status.Pass, "User is active");
     }
     else
     {
         Console.WriteLine("User is InActive");
         Console.WriteLine(ManageUsersTableRow.Text);
         EditUserBtn.Click();
         UserEmailTextBox.EnterText(value);
         IsUserActiveCheckbox.Click();
         SaveUserBtn.Click();
         Thread.Sleep(5000);
         SearchTextBox.EnterText(searchtext);
         Console.WriteLine("User is now active");
         Console.WriteLine(ManageUsersTableRow.Text);
     }
 }
Beispiel #2
0
 public void EditUserNameTest(String searchtext, String useremail, IWebElement ManageUsersTableRow)
 {
     //DriverUtils.LaunchBrowser("http://cos-test.psr.rd.hpicorp.net/COSWeb/ManageUser/UserManagement");
     SearchTextBox.EnterText(searchtext);
     if (!string.IsNullOrEmpty(ManageUsersTableRow.Text) && (!string.IsNullOrWhiteSpace(ManageUsersTableRow.Text) && ManageUsersTableRow.Text.Contains(searchtext)))
     {
         Console.WriteLine(ManageUsersTableRow.Text);
         EditUserBtn.Click();
         UserEmailTextBox.EnterText(useremail);
         SaveUserBtn.Click();
         Thread.Sleep(2000);
     }
     else
     {
         Console.WriteLine(ManageUsersTableRow.Text);
         Console.WriteLine("User doesnt exist in the given table.");
     }
 }