Example #1
0
        public void EditUserFunc(String searchtext, IWebElement UserEmailTextBox, String value, IWebElement dropdownelement, IWebElement ddlistbox, int ddloption, IWebElement FirstName, String fnamevalue, IWebElement LastName, String lnamevalue, IWebElement IsUserActiveFlag, IWebElement SaveUserBtn)
        {
            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("User data exist in the table" + ManageUsersTableRow.Text);
                EditUserBtn.Click();
                UserEmailTextBox.EnterText(value);
                BasicMethods.DropDownFunction(dropdownelement, ddlistbox, ddloption);
                FirstName.EnterText(fnamevalue);
                LastName.EnterText(lnamevalue);
                IsUserActiveFlag.Click();
                SaveUserBtn.Click();
                Thread.Sleep(8000);
                //CreateUserCloseBtn.Click();
                Common.ExtentReport.test.Log(AventStack.ExtentReports.Status.Pass, "Updated User Information!!");
            }
            else
            {
                string s = BasicMethods.TakeScreenShot();
                Common.ExtentReport.test.Log(AventStack.ExtentReports.Status.Fail, MarkupHelper.CreateLabel("No record found", ExtentColor.Red)).AddScreenCaptureFromPath(s);
            }
        }
Example #2
0
 public void CreateUserFunc(IWebElement UserEmailTextBox, String value, IWebElement UserRole, IWebElement UserRoleOptions, int ddloption, IWebElement FirstName, String fnamevalue, IWebElement LastName, String lnamevalue, IWebElement CreateBtn)
 {
     DriverUtils.LaunchBrowser("http://cos-test.psr.rd.hpicorp.net/COSWeb/ManageUser/UserManagement");
     CreateNewUserBtn.Click();
     UserEmailTextBox.EnterText(value);
     BasicMethods.DropDownFunction(UserRole, UserRoleOptions, ddloption);
     FirstName.EnterText(fnamevalue);
     LastName.EnterText(lnamevalue);
     //IsUserActiveFlag.Click();
     //Validations.validateElementIsEnabled(CreateUserBtn);
     CreateUserBtn.Click();
     Thread.Sleep(5000);
     // CreateUserCloseBtn.Click();
 }