예제 #1
0
        public HomePage loginToApplication()
        {
            //Testdata sheet login credentials overwrites Environment config Login credentials
            if (Reporter.strCurrentUserID == "")
            {
                Reporter.strCurrentUserID = ExcelUtil.GetData("LoginUserName");
            }
            if (Reporter.strCurrentPassword == "")
            {
                Reporter.strCurrentPassword = ExcelUtil.GetData("LoginPassword");
            }

            Reporter.ReportEvent("Login", "Loging in with User: "******"Done");

            WebUtility.EnterText <HtmlEdit>(WebUtility.PropertyType.Name, "uid", Reporter.strCurrentUserID);
            WebUtility.EnterText <HtmlEdit>(WebUtility.PropertyType.Name, "password", Reporter.strCurrentPassword);
            WebUtility.ClickItem <HtmlInputButton>(WebUtility.PropertyType.Name, "btnLogin");

            //Validate Login
            if (WebUtility.WaitForItemExist <HtmlHyperlink>(WebUtility.PropertyType.InnerText, "New Customer"))
            {
                Reporter.ReportEvent("Login successful.", "Logged in successfully with User: "******"PASS");
            }
            else
            {
                Reporter.ReportEvent("Login Fail.", "Login is un successfully with User: "******"FAIL");
            }

            return(new HomePage());
        }
예제 #2
0
        public CustRegistPage SubmitNewCustDetails()
        {
            WebUtility.ClickItem <HtmlInputButton>(WebUtility.PropertyType.Name, "sub");

            if (WebUtility.clickWebPopupOKButton().WaitForControlExist(5000))
            {
                Mouse.Click(WebUtility.clickWebPopupOKButton());
                Reporter.ReportEvent("Unable to Submit Customer Details", "The email ID used already exists", "FAIL");
            }
            else
            {
                Reporter.ReportEvent("Submit New Customer Details", "New Customer details Submited successfully", "PASS");
            }

            return(new CustRegistPage());
        }
예제 #3
0
        public AddNewCustPage navigateToNewCustPage()
        {
            WebUtility.ClickItem <HtmlHyperlink>(WebUtility.PropertyType.InnerText, "New Customer");


            //Validate Login
            if (WebUtility.WaitForItemExist <HtmlEdit>(WebUtility.PropertyType.Name, "name"))
            {
                Reporter.ReportEvent("New Customer Page navigate", "Navigated successfully to New Customer Page", "PASS");
            }
            else
            {
                Reporter.ReportEvent("New Customer Page navigate", "Failed to navigate to New Customer Page", "FAIL");
            }

            return(new AddNewCustPage());
        }
예제 #4
0
 public HomePage navigateToHomePage()
 {
     WebUtility.ClickItem <HtmlHyperlink>(WebUtility.PropertyType.InnerText, "Manager");
     return(new HomePage());
 }
예제 #5
0
 public LoginPage applicationLogout()
 {
     WebUtility.ClickItem <HtmlHyperlink>(WebUtility.PropertyType.InnerText, "Log out");
     Mouse.Click(WebUtility.clickWebPopupOKButton());
     return(new LoginPage());
 }