public void merchnatTypePushToOffice() { var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var createProcessorHelper = new CreateProcessorHelper(GetWebDriver()); var createMerchantTypeHelper = new CreateMerchantTypeHelper(GetWebDriver()); //Variable var name = "Test" + GetRandomNumber(); var Test = "New" + GetRandomNumber(); //Login with valid credential Username createMerchantTypeHelper.TypeText("EnterUsername", "selcorp"); //Login with valid credential password createMerchantTypeHelper.TypeText("EnterPassword", "seWelcome2"); //Click On Login Button createMerchantTypeHelper.ClickElement("ClickOnLoginButtojn"); createMerchantTypeHelper.WaitForWorkAround(3000); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Residual Income tab createMerchantTypeHelper.ClickElement("ClickMasterTab"); //Click to Import createMerchantTypeHelper.redirectToPage(); //Click On Create createMerchantTypeHelper.ClickElement("ClickOnCreate"); //Enter Merchant Type createMerchantTypeHelper.TypeText("MerchantType", name); //Click On Save Btn createMerchantTypeHelper.ClickElement("ClickOnSaveBtn"); createMerchantTypeHelper.WaitForWorkAround(3000); //Click On Push Office createMerchantTypeHelper.ClickElement("ClickOnPushOffice"); createMerchantTypeHelper.AcceptAlert(); createMerchantTypeHelper.WaitForWorkAround(5000); //################ LOGOUT ######################3 //Mover HoverWelcome createMerchantTypeHelper.MouseHover("WelcomeMoveHover"); // Logout button GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/logout"); //################### OFFICE SIDE //Login with valid credential Username createProcessorHelper.TypeText("EnterUsernameOff", "AslamKhan"); //Login with valid credential password createProcessorHelper.TypeText("EnterPasswordOff", "1qaz!QAZ"); //Click On Login Button createProcessorHelper.ClickElement("ClickOnLoginButtojn"); //Mover HoverWelcome createProcessorHelper.MouseHover("WelcomeMoveHover"); // Click ON Admin createProcessorHelper.ClickElement("ClickOnAdmin"); createProcessorHelper.WaitForWorkAround(4000); //Click On Mater createProcessorHelper.ClickElement("ClickOnMaterOff"); //Redirect to Procesosr GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/merchant_types"); createMerchantTypeHelper.WaitForWorkAround(2000); //Search Merchnat Type createMerchantTypeHelper.TypeText("SearchMerchnatType", name); createMerchantTypeHelper.WaitForWorkAround(3000); //Verify Merchnat createMerchantTypeHelper.VerifyPageText(name); createMerchantTypeHelper.WaitForWorkAround(3000); }
public void editAndDeleteMerchnatType() { var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var createMerchantTypeHelper = new CreateMerchantTypeHelper(GetWebDriver()); //Variable var name = "Test" + GetRandomNumber(); var Test = "New" + GetRandomNumber(); //Login with valid credential Username createMerchantTypeHelper.TypeText("EnterUsername", "selcorp"); //Login with valid credential password createMerchantTypeHelper.TypeText("EnterPassword", "seWelcome2"); //Click On Login Button createMerchantTypeHelper.ClickElement("ClickOnLoginButtojn"); createMerchantTypeHelper.WaitForWorkAround(3000); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Residual Income tab createMerchantTypeHelper.ClickElement("ClickMasterTab"); //Click to Import createMerchantTypeHelper.redirectToPage(); //Click On Create createMerchantTypeHelper.ClickElement("ClickOnCreate"); //Enter Merchant Type createMerchantTypeHelper.TypeText("MerchantType", name); //Click On Save Btn createMerchantTypeHelper.ClickElement("ClickOnSaveBtn"); createMerchantTypeHelper.WaitForWorkAround(3000); //Search Merchnat Type createMerchantTypeHelper.TypeText("SearchMerchnatType", name); createMerchantTypeHelper.WaitForWorkAround(3000); //Click On Edit createMerchantTypeHelper.ClickElement("EditMerchnatType"); createMerchantTypeHelper.WaitForWorkAround(1000); //Click on EDit Save createMerchantTypeHelper.ClickElement("ClickOnSaveEdit"); //Verify Validation createMerchantTypeHelper.VerifyPageText("The merchant type is already exists."); //Enter Merchant Type String EditMerchnat = "Updated Merchnat" + RandomNumber(22,999); createMerchantTypeHelper.TypeText("MerchantType", EditMerchnat); //Click on EDit Save createMerchantTypeHelper.ClickElement("ClickOnSaveEdit"); //Verify Confirmation createMerchantTypeHelper.VerifyPageText("The merchant type is successfully updated!!"); createMerchantTypeHelper.WaitForWorkAround(3000); //Search Merchnat Type createMerchantTypeHelper.TypeText("SearchMerchnatType", EditMerchnat); createMerchantTypeHelper.WaitForWorkAround(3000); //Click Delete createMerchantTypeHelper.ClickElement("DeleteMerchnatType"); createMerchantTypeHelper.AcceptAlert(); createMerchantTypeHelper.WaitForWorkAround(2000); //Verify Confirmtion createMerchantTypeHelper.VerifyPageText("The merchant type is successfully deleted!!"); createMerchantTypeHelper.WaitForWorkAround(2000); }