示例#1
0
        public void DoesValidationMessageAppearsWithNoService()
        {
            AgentSearchScreen     ScreenObject = AgentScreenNavigation.NavigateToAgentMenuPage();
            AddNewAgentDialog     dialogObj    = ScreenObject.ClickAddNewAgent();
            AgentServicesProvided obj          = dialogObj.EnterNames(AddNewAgentDialog.RandomString(10), AddNewAgentDialog.RandomString(10));

            obj.CreateButtonClick();
            Assert.True(obj.IsAlertMessageAppearingOnKeepingServiceEmpty());
        }
示例#2
0
        public static AgentSearchScreen AddNewAgentForReuse(string s1, string s2)  //For No Match ( NEW)
        {
            AgentSearchScreen     ScreenObject = AgentScreenNavigation.NavigateToAgentMenuPage();
            AddNewAgentDialog     dialogObj    = ScreenObject.ClickAddNewAgent();
            AgentServicesProvided obj          = dialogObj.EnterNames(s1, s2);
            AgentSearchScreen     mainobj      = obj.SelectAgentService();

            return(new AgentSearchScreen());
        }
示例#3
0
        public static AgentSearchScreen AddAgentForReuse(string s1, string s2)  //For Matching Result Found
        {
            AgentSearchScreen     ScreenObject = AgentScreenNavigation.NavigateToAgentMenuPage();
            AddNewAgentDialog     dialogObj    = ScreenObject.ClickAddNewAgent();
            MatchingAgentScreen   obj          = dialogObj.PassingNames(s1, s2);
            AgentServicesProvided mainobj      = obj.ClickOnNewAgentButton();

            mainobj.SelectAgentService();
            return(new AgentSearchScreen());
        }
示例#4
0
        public void AgentNameAppendAndBackkeyFunctionality()
        {
            AgentSearchScreen ScreenObject = AgentScreenNavigation.NavigateToAgentMenuPage();
            AddNewAgentDialog dialogObj    = ScreenObject.ClickAddNewAgent();
            string            forename     = AddNewAgentDialog.RandomString(10);
            string            surname      = AddNewAgentDialog.RandomString(10);

            bool assert1 = dialogObj.IsNameAppended(forename, surname);
            bool assert2 = dialogObj.BackKeyFunctioningProperly(forename, surname);

            Assert.True(assert1 && assert2);
        }
示例#5
0
        public void CheckValidationOnKeepingSurNameForeNameEmpty()
        {
            AgentSearchScreen ScreenObject = AgentScreenNavigation.NavigateToAgentMenuPage();
            AddNewAgentDialog dialogObj    = ScreenObject.ClickAddNewAgent();

            BaseSeleniumComponents.WaitUntilDisplayed(AgentElements.MainScreen.AgentForename);

            Assert.True(ScreenObject.CheckValidation("", "") &&                                  // for empty forename and surname.
                        ScreenObject.CheckValidation("p", "") &&                                 // for empty surname.
                        ScreenObject.CheckValidation("", "P") &&                                 // for empty forename
                        Int32.Parse(dialogObj.AgentForeName.GetAttribute("maxlength")) == 100 && // For forename maxlength
                        Int32.Parse(dialogObj.AgentSurName.GetAttribute("maxlength")) == 100);   // For surname maxlength
        }
示例#6
0
        public void CanSelectAndDeleteExistingAgent()
        {
            //Can I select to delete any individual Agent record via existing Agent record screen?
            AgentSearchScreen     ScreenObject = AgentScreenNavigation.NavigateToAgentMenuPage();
            AddNewAgentDialog     dialogObj    = ScreenObject.ClickAddNewAgent();
            string                fname        = AddNewAgentDialog.RandomString(10);
            string                lname        = AddNewAgentDialog.RandomString(10);
            AgentServicesProvided obj          = dialogObj.EnterNames(fname, lname);
            AgentSearchScreen     mainobj      = obj.SelectAgentService();

            POM.Helper.SeleniumHelper.CloseTab("Agent Details");
            AgentSearchScreen SObj = AgentScreenNavigation.NavigateToAgentMenuPage(false);

            ScreenObject.SelectAgentRecordFromSearch(fname, lname);

            //Delete the newly added record.
            Assert.True(ScreenObject.DeleteAgentRecord());
        }