public void Registration_JoinNowSuccess_WS_1052() { if (!DataParser.ReturnExecution("WS_1052")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1052.xml"; string firstName = RegisterData.GetRegisterFirstName(_file), lastName = RegisterData.GetRegisterLastName(_file), ID = RegisterData.GetRegisterID(_file), email = RegisterData.GetRegisterEmail(_file); Register registerPage = InitialPage.Go().ClickJoinNow(); Assert.AreEqual("First Name", registerPage.GetName("First Name"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsFirstNameFieldAvailable(), "First Name field is not available"); Assert.AreEqual("Last Name", registerPage.GetName("Last Name"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsLastNameAvailable(), "Last Name button is not available"); Assert.AreEqual("Employee ID", registerPage.GetName("Employee ID"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsIDFieldAvailable(), "ID field is not available"); Assert.AreEqual("Email Address", registerPage.GetName("Email Address"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsEmailFieldAvailable(), "email field is not available"); registerPage.EnterFirstName(firstName) .EnterLastName(lastName) .EnterEmployeeID(ID) .EnterEmployeeEmail(email) .ClickRegister(); Assert.AreEqual( "Success!\r\nWe found you. Check your inbox at " + email + " for a link to finish registration. Thank you!", registerPage.GetSuccessMsg(), "Message is not the expected"); } }
public void Awards_ViewDetailsModal_WS_1274() { if (!DataParser.ReturnExecution("WS_1274")) { Assert.Ignore(); } else { ReportsPage reportpage = InitialPage.Go().Logon().ClickLogin().NavigateToReports(); string issuer = reportpage.GetAwardTable(1, 8), award = reportpage.GetAwardTable(1, 4), recipient = reportpage.GetAwardTable(1, 2), awardTie = reportpage.GetAwardTable(1, 4), teamName = reportpage.GetAwardTable(1, 6), date = reportpage.GetAwardTable(1, 1), amount = reportpage.GetAwardTable(1, 3); ReportDetailsPage detailsPage = reportpage.ClickViewDetails(1); Assert.AreEqual(issuer, detailsPage.GetIssuer(), "Issuer Value is not the same"); Assert.AreEqual(award, detailsPage.GetAward(), "Issuer Value is not the same"); Assert.AreEqual(recipient, detailsPage.GetRecipient(), "Issuer Value is not the same"); Assert.AreEqual(awardTie, detailsPage.GetAwardTie(), "Issuer Value is not the same"); Assert.AreEqual(teamName, detailsPage.GetteamName(), "Issuer Value is not the same"); Assert.AreEqual(date, detailsPage.Getdate(), "Issuer Value is not the same"); Assert.AreEqual(amount, detailsPage.GetAmount(), "Issuer Value is not the same"); } }
public void ContactUs_Submission_WS_1431() { if (!DataParser.ReturnExecution("WS_1431")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1431.xml"; string firstname = RegisterData.GetRegisterFirstName(_file), lastname = RegisterData.GetRegisterLastName(_file), email = RegisterData.GetRegisterEmail(_file), inquiry = RegisterData.GetInquiryType(_file), msg = RegisterData.GetInquiry(_file); HelpHomePage helpPage = InitialPage.Go().Logon().ClickLogin().NavigateToHelp(); helpPage.EnterFirstName(firstname) .EnterLastName(lastname) .EnterEmail(email) .SelectCountry(inquiry) .EnterInquiry(msg) .ClickSubmit(); Assert.AreEqual("Your inquiry has been successfully submitted. Please expect a response within 1 - 2 business days.", helpPage.GetSuccessfullMsg(), "The inquiry was not send successfully or the message is wrong"); } }
public void Bugdet_FundFromReciepts_WS_1196() { if (!DataParser.ReturnExecution("WS_1196")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1196.xml"; string user = AwardData.GetAwardUserName(_file), msg = AwardData.GetAwardMessage(_file), award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file), amountvalue = AwardData.GetAwardAmountValue(_file), proxy_name = ProxyData.GetProxyUserName(_file), proxy_name2 = ProxyData.GetProxySecondUserName(_file); MainHomePage proxyPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage().LoginProxyAsuser().EnterUserNameHealthAlliance(proxy_name).ProxyToMainHomePage(); NominationHomePage recognitionPage = proxyPage.NavigateToHomePage().NavigateToNomination(); Thread.Sleep(1500); recognitionPage .SearchEmployeeFound(user) .SelectAward(award) .SelectValueOfAward(amountvalue) .SelectValues(value) .FillMsg(msg) .ClickNext() .EmailReward(); recognitionPage.ClickSendRecognition(); var proxypage = recognitionPage.ExitProxy().NavigateToAdminHomePage().LoginProxyAsuser().EnterUserNameHealthAlliance(proxy_name2) .ProxyToMainHomePage().ClosePopUp(); Thread.Sleep(300); var amount = proxypage.GetBudget(); //Fail cannot appear link to switch to see the budget PendingApprovals pending = proxypage.NavigateToPendingApprovals(); Thread.Sleep(300); } }
public void EventCalendar_Anniversaries_WS_1084() { if (!DataParser.ReturnExecution("WS_1084")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1084.xml"; username = ProxyData.GetProxyUserName(_file); string username2 = ProxyData.GetProxySecondUserName(_file), award = AwardData.GetAwardName(_file), msg = AwardData.GetAwardMessage(_file); MainHomePage home = InitialPage.Go().Logon().ClickLogin(); ProxyHomePage proxyPage = home.NavigateToAdminHomePage().LoginProxyAsuser(); proxyPage.EnterUserName(username); home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + username, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present"); EventCalendar eventPage = home.NavigateToEventCalendar(); eventPage.ClickRecent(); Assert.AreEqual(username2 + "\r\n12 year Anniversary", eventPage.GetNameList(6), username2 + " is not present"); NominationHomePage nomination = eventPage.clickSendAniversaryCard().SelectAward(award).FillMsg(msg).SelectImgs(); nomination.EmailReward().ClickSendRecognition(); Assert.AreEqual("Success!", nomination.GetSuccesMsg(), "Message its not success"); Assert.AreEqual("FINISH", nomination.GetBtnFinishLabel(), "Button finish its not correct write"); Assert.AreEqual("RECOGNIZE", nomination.GetBtnRecognizOtherLabel(), "Button finish its not correct write"); } }
public void Registration_UnsuccesfulEmpId_WS_1218() { if (!DataParser.ReturnExecution("WS_1218")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1218.xml"; string firstName = RegisterData.GetRegisterFirstName(_file), lastName = RegisterData.GetRegisterLastName(_file), ID = RegisterData.GetRegisterID(_file), email = RegisterData.GetRegisterEmail(_file); Register registerPage = InitialPage.Go().ClickJoinNow(); Assert.AreEqual("First Name", registerPage.GetName("First Name"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsFirstNameFieldAvailable(), "First Name field is not available"); Assert.AreEqual("Last Name", registerPage.GetName("Last Name"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsLastNameAvailable(), "Last Name button is not available"); Assert.AreEqual("Employee ID", registerPage.GetName("Employee ID"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsIDFieldAvailable(), "ID field is not available"); Assert.AreEqual("Email Address", registerPage.GetName("Email Address"), "First Name is now well spell"); Assert.IsTrue(registerPage.IsEmailFieldAvailable(), "email field is not available"); registerPage.EnterFirstName(firstName) .EnterLastName(lastName) .EnterEmployeeID(ID) .EnterEmployeeEmail(email) .ClickRegister(); Assert.AreEqual( "Hmm, we couldn't find anyone matching the information you entered. Please make sure your email and Employee ID are correct. Also, maybe we have a different variation of your first or last name?", registerPage.GetSuccessMsg(), "Message is not the expected"); } }
public void Reports_SortingColumns_WS_1225() { if (!DataParser.ReturnExecution("WS_1225")) { Assert.Ignore(); } else { ReportsPage reportpage = InitialPage.Go().Logon().ClickLogin().NavigateToReports(); Assert.AreEqual(url + "report/bae_awards", reportpage.GetCurrentUrl(), "URL is not the correct"); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(1); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(2); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(3); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(4); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(5); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(6); Assert.IsFalse(reportpage.LoadTakesMoreThan10sec(), "The Report takes more than 10 sec to load"); reportpage.ClickHeader(7); } }
public void Recognition_EmployeeLookUp_WS_69() { if (false) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_69.xml"; username = AwardData.GetAwardUserName(_file); MainHomePage home = InitialPage.Go().Logon().ClickLogin(); NominationHomePage recognitionPage = home.NavigateToNomination(); //SCENARIO 1 recognitionPage.SearchEmployeeFound(username); recognitionPage.ClickEdit(); Assert.IsTrue(recognitionPage.BringToStep1(), "You didnt go back to step 1"); //SCENARIO 2 recognitionPage = home.NavigateToNomination(); recognitionPage.ClickMultipleRecipients() .SearchEmployeeFoundMultiple(username) .SearchEmployeeFoundMultiple("John"); recognitionPage.ClickNextGeneric().ClickEdit().ClickRemove(0); Assert.IsFalse(recognitionPage.IsFirstUserAddedPresent(username), "First User still in the list selected"); } }
public void Recognition_NonMonAndMon_WS_1157_Sample6() { if (!DataParser.ReturnExecution("WS_1157_Sample6")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1157_Sample6.xml"; string user = AwardData.GetAwardUserName(_file), value = AwardData.GetAwardValue(_file), amountvalue = AwardData.GetAwardAmountValue(_file), reason = AwardData.GetAwardReason(_file), award = AwardData.GetAwardName(_file), printype = AwardData.GetAwardDeliverType(_file), proxyname = ProxyData.GetProxyUserName(_file), msg = AwardData.GetAwardMessage(_file); NominationHomePage recognitionPage = InitialPage.Go().EnterId(client).Logon().ClickLogin(). NavigateToAdminHomePageSpan().ClickOptionProxy("Proxy1").EnterUserNameProxySprint2(proxyname).ClickProxyBtn().NavigateToNominationSpan(); recognitionPage .SearchEmployeeFoundAngular(user) .SelectAward(award).SelectValueOfAward(amountvalue).SelectValues(value) .FillMsg(msg).FillReason(reason) .ClickNextSprint(); Assert.AreEqual("I want to Email this award.", recognitionPage.GetDeliverLabel("email"), "Label is not correct"); Assert.AreEqual("I want to Print this award", recognitionPage.GetDeliverLabel("print"), "Label is not correct"); recognitionPage.DeliverTypeAngular(printype).ClickNextGeneric(); Assert.AreEqual("Ready to send?", recognitionPage.GetReadyToSendMsg(), "The message is not ready to send"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); } }
public void Proxy_TestSearch_WS_1210() { if (!DataParser.ReturnExecution("WS_1210")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1210.xml"; string username1 = ProxyData.GetProxySecondUserName(_file), username = ProxyData.GetProxyUserName(_file), username2 = ProxyData.GetProxyThirdUserName(_file); MainHomePage home = InitialPage.Go().Logon().ClickLogin(); ProxyHomePage proxyPage = home.NavigateToAdminHomePage().LoginProxyAsuser(); proxyPage.EnterUserName(username); home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + username + " Ahsing", home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present"); home = home.ExitProxy().EnterUserName(username1).ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + "Aaron " + username1, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present"); home = home.ClosePopUp().ExitProxy().EnterUserName(username2).ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + username2, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present"); } }
public void Recognition_ApprovalMon_WS_924() { if (!DataParser.ReturnExecution("WS_924")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_924.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), secondAward = AwardData.GetSecondAwardName(_file), populationImpact = AwardData.GetAwardPopulationImpact(_file), financialImpact = AwardData.GetAwardFinancialImpact(_file), bussinesImpact = AwardData.GetAwardBussinesImpact(_file); int amount = AwardData.GetAwardAmountValueNumbers(_file); string printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), reason = AwardData.GetAwardReason(_file), companyValue = AwardData.GetAwardCompanyValue(_file), proxy_name = ProxyData.GetProxyUserName(_file), approval_name = AwardData.GetApprovalUserName(_file); ProxyHomePage proxyPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage() .LoginProxyAsuser().EnterUserName(proxy_name); MainHomePage home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + proxy_name, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); NominationHomePage recognitionPage = home.NavigateToNomination() .SearchEmployeeFound(user) .SelectAward(award) .EnterValueAmount(amount) .FillReason(reason) .ChkCompanyValues(companyValue) .SelectValues(populationImpact) .SelectValues(bussinesImpact) .SelectValues(financialImpact) .FillMsg(msg) .ClickNext(); recognitionPage.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); AdminHomePage proxy = recognitionPage.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(approval_name).ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + approval_name, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up"); PendingApprovals pending = home.ClickHereAwardPopUp(); Assert.AreEqual("Pending Approvals", pending.GetTitleMenu(), "Title is not pending approval"); pending.ApproveAward().ClickApprove(); proxy = pending.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(user).ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + user, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); MyAwards awards = home.ClosePopUp().NavigateToMyAwards(); Assert.AreEqual(secondAward, awards.GetAwardName(1, 4), "The last award that someone gave you is not present"); awards.OpenDetailsAward(1, 7); } }
//WS_1118 public void Checkout_ShippingValidateFullNamePT1_WS_1118() { if (false) { Assert.Ignore(); } else { string name = "Foot Locker", deliver = "email"; GoToMallHomePage mallPage = InitialPage.Go().Logon().ClickLogin().NavigateToRedeem(); CompanyGiftCard giftCardPage = mallPage.SearchCompany(name).SelectCompany(); Assert.AreEqual("10", giftCardPage.GetAmount(), "10 is not the default amount"); giftCardPage.ClickPlusAmount().ClickPlusAmount().ClickPlusAmount(); Assert.IsTrue(giftCardPage.IsQtyAvailable(), "Quantity field is available"); CompanyGifCart cartPage = giftCardPage.ClickAddToCart().ClickGoToCart(); Assert.IsTrue(cartPage.IsFootLockerAdded(), "FootLocker was not added to the cart"); CheckOutPage checkout = cartPage.ClickCheckOut(); checkout.FillName("A") .FillLastName("A") .FillAddress("123 Test"); Assert.AreEqual("Please enter at least 2 characters.", checkout.GetErrorMsgFirstName(), "The Error Message is not present or show"); Assert.AreEqual("Please enter at least 2 characters.", checkout.GetErrorMsgLastName(), "The Error Message is not present or show"); } }
private Page CreatePageAsync(string viewModelName) { if (viewModelName == null) { throw new ArgumentNullException(nameof(viewModelName)); } Page contentPage; switch (viewModelName) { case nameof(InitialPage): contentPage = new InitialPage(); break; case nameof(AuthenticationPage): contentPage = new AuthenticationPage(); break; default: throw new Exception("Content page does not exist"); } return(contentPage); }
public void CheckOut_NoAddresValidation_WS_1306() { if (false) { Assert.Ignore(); } else { GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall(); mallPage.CheckOptionPurchaseType("Email (Instant)"); CompanyGiftCard giftCard = mallPage.SearchCompany("Buffalo").SelectCompany(); CheckOutPage checkout = giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart().ClickCheckOut().ClickNext(); Assert.AreEqual("This field is required.", checkout.GetErrorMsgFirstName(), "Error msg is not show or incorrect in first name"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgLastName(), "Error msg is not show or incorrect in last name"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgAddress(), "Error msg is not show or incorrect in Address"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgCity(), "Error msg is not show or incorrect in city"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgZip(), "Error msg is not show or incorrect in Zip code"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgPhone(), "Error msg is not show or incorrect in phone number"); } }
public void BudgetReport_DeactivateModal_WS_1282() { if (!DataParser.ReturnExecution("WS_1282")) { Assert.Ignore(); } else { BudgetHomePage reportpage = InitialPage.Go().Logon().ClickLogin().NavigateToReports().ClickBudgetLeftMenu(); var editdetailsPage = reportpage.ClickEdit(1); Assert.AreEqual("ADD", reportpage.GetAddBtnTxt(), "Issuer Value is not the same"); Assert.AreEqual("SUBTRACT", reportpage.GetSubstratBtnTxt(), "Subtract Value is not the same"); Assert.AreEqual("DEACTIVATE", reportpage.GetDeactBtnTxt(), "Deactivate Value is not the same"); Assert.AreEqual("CLOSE", reportpage.GetBtnCloseTxt(), "close Value is not the same"); reportpage.ClickDeactivate(); editdetailsPage = reportpage.ClickEdit(1); Assert.AreEqual("Budget Active Status: false", editdetailsPage.GetDeactMsg(), "Deact Text is not the same as expected"); editdetailsPage.ClickActivate(); reportpage = editdetailsPage.ClickEdit(1); Assert.AreEqual("ADD", reportpage.GetAddBtnTxt(), "Issuer Value is not the same"); Assert.AreEqual("SUBTRACT", reportpage.GetSubstratBtnTxt(), "Subtract Value is not the same"); Assert.AreEqual("DEACTIVATE", reportpage.GetDeactBtnTxt(), "Deactivate Value is not the same"); Assert.AreEqual("CLOSE", reportpage.GetBtnCloseTxt(), "close Value is not the same"); reportpage.ClickClose(); } }
public void Approval_StandardMonAppvTextron_WS_927() { if (!DataParser.ReturnExecution("WS_927")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_927.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), secondAward = AwardData.GetSecondAwardName(_file), populationImpact = AwardData.GetAwardPopulationImpact(_file), financialImpact = AwardData.GetAwardFinancialImpact(_file), bussinesImpact = AwardData.GetAwardBussinesImpact(_file), amount = AwardData.GetAwardAmountValue(_file), objetives = AwardData.GetAwardObjetives(_file), printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), projectTask = AwardData.GetAwardProjectTask(_file), reason = AwardData.GetAwardReason(_file), proxy_name = ProxyData.GetProxyUserName(_file), approval_name = AwardData.GetApprovalUserName(_file); ProxyHomePage proxyPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage() .LoginProxyAsuser().EnterUserName(user); MainHomePage home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + user, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Step2 step2 = home.NavigateToNomination() .SearchEmployeeFound(proxy_name) .SelectAward(award) .SelectValues(populationImpact) .SelectValues(financialImpact) .SelectValues(bussinesImpact) .ClickNextSameStep(); Assert.AreEqual("Appreciation Award", step2.GetAwardName("Appreciation Award"), "Award is not the same as expected"); Assert.AreEqual("Honors Award", step2.GetAwardName("Honors Award"), "Award is not the same as expected"); Assert.AreEqual("Excellence Award", step2.GetAwardName("Excellence Award"), "Award is not the same as expected"); Assert.AreEqual("Distinction Award", step2.GetAwardName("Distinction Award"), "Award is not the same as expected"); NominationHomePage recognitionPage = step2.SelectSecondAward(secondAward).SelectValueOfAward(amount) .SelectProjectTask(projectTask) .CheckProjectApproval() .SelectValues(objetives) .FillMsg(msg) .FillReason(reason) .ClickNext(); recognitionPage.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); AdminHomePage proxy = recognitionPage.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(approval_name).ProxyToMainHomePage(); Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up"); PendingApprovals pending = home.ClickHereAwardPopUp(); Assert.AreEqual("Pending Approvals", pending.GetTitleMenu(), "Title is not pending approval"); pending.ApproveAward().ClickApprove(); proxy = pending.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(proxy_name).ProxyToMainHomePage(); MyAwards awards = home.ClosePopUp().NavigateToMyAwards(); Assert.AreEqual(secondAward, awards.GetAwardName(1, 6), "The last award that someone gave you is not present"); awards.OpenDetailsAward(1, 7); } }
public App() { InitializeComponent(); // MainPage = new MainPage(); MainPage = new InitialPage(); }
public void ShouldBeAbleToBuyDeal() { InitialPage.GoTo(); var closebutton = Driver.Instance.FindElement(By.ClassName("close")); closebutton.Click(); var firstdeal = Driver.Instance.FindElement(By.XPath("//img[@data-priority = '1']")); IJavaScriptExecutor jse = (IJavaScriptExecutor)Driver.Instance; jse.ExecuteScript("arguments[0].click();", firstdeal); var buynow = By.XPath("//div[@class='deal-page-container clear-fix']//a[contains(text(), 'Buy Now')]"); var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10)); wait.Until(ExpectedConditions.ElementIsVisible(buynow)); var buy = Driver.Instance.FindElement(buynow); jse.ExecuteScript("arguments[0].click();", buy); var newcustomer = By.XPath("//ul//li[text()[contains(.,'New customer')]]"); wait.Until(ExpectedConditions.ElementIsVisible(newcustomer)); var actualvalue = GetText(Driver.Instance, newcustomer); Assert.AreEqual(actualvalue, "NEW CUSTOMER"); }
public App() { InitializeComponent(); //MainPage = new NavigationPage(new MainTabbedPage()); MainPage = new InitialPage(); }
public void WS_1064() { if (!DataParser.ReturnExecution("WS_1064")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1064.xml"; username = ProxyData.GetProxyUserName(_file); string username2 = ProxyData.GetProxySecondUserName(_file), preferedName = RegisterData.GetRegisterPreferedName(_file); MainHomePage home = InitialPage.Go().Logon().ClickLogin(); ProxyHomePage proxyPage = home.NavigateToAdminHomePage().LoginProxyAsuser(); proxyPage.EnterUserName(username); home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + username, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present"); Assert.IsTrue(home.IsAdmLnkPresent(), "Admin link is present"); ProxyHomePage adminPage = home.NavigateToAdminHomePage().LoginProxyAsuser(); proxyPage.EnterUserName(username2); home = proxyPage.ProxyToMainHomePage(); Assert.AreEqual("You are proxied in under: " + username2, home.GetProxyLoginMsg(), "The message of proxy login is not correct"); Assert.AreEqual("Exit Proxy", home.GetExitMsg(), "The exit proxy link is not present"); Assert.IsFalse(home.IsAdmLnkPresent(), "Admin link is present"); adminPage = home.ExitProxy(); Assert.IsTrue(adminPage.IsAdminLoginUsernameLevel(preferedName), "You are not in the login leveled like support,admin or proxy"); } }
//WS_1120 public void Checkout_ShippingValidateFullNamePT2_WS_1120() { if (!DataParser.ReturnExecution("WS_1120")) { Assert.Ignore(); } else { string name = "Foot Locker", deliver = "email"; GoToMallHomePage mallPage = InitialPage.Go().Logon().ClickLogin().NavigateToRedeem(); CompanyGiftCard giftCardPage = mallPage.SearchCompany(name).SelectCompany(); Assert.AreEqual("10", giftCardPage.GetAmount(), "10 is not the default amount"); giftCardPage.ClickPlusAmount().ClickPlusAmount().ClickPlusAmount(); Assert.IsTrue(giftCardPage.IsQtyAvailable(), "Quantity field is available"); CompanyGifCart cartPage = giftCardPage.ClickAddToCart().ClickGoToCart(); Assert.IsTrue(cartPage.IsFootLockerAdded(), "FootLocker was not added to the cart"); CheckOutPage checkout = cartPage.ClickCheckOut(); //SCENARIO B checkout.FillName("Test") .FillLastName("Test") .FillAddress("123 Test Street") .FillCity("Test") .FillZipCode("11101") .FillPhoneNumber("111 111 1111") .ClickNext(); Assert.IsTrue(checkout.IsPaymentOptionAvailable(), "Payment option is not available"); } }
public void SocialStream_Recognition_WS_1391() { if (!DataParser.ReturnExecution("WS_1391")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1391.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file), printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file); NominationHomePage recognitionPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToNominationSpan(); recognitionPage .SearchEmployeeFoundAngular(user) .SelectAward(award) .SelectValues(value) .FillMsg(msg) .ClickNextSprint(); Assert.AreEqual("I want to Email this award.", recognitionPage.GetDeliverLabel("email"), "Label is not correct"); Assert.AreEqual("I want to Print this award", recognitionPage.GetDeliverLabel("print"), "Label is not correct"); recognitionPage.DeliverTypeAngular(printype).ClickNextGeneric(); Assert.AreEqual("Ready to send?", recognitionPage.GetReadyToSendMsg(), "The message is not ready to send"); recognitionPage.ClickSendRecognition(); Assert.AreEqual("Success!", recognitionPage.GetSuccesMsg(), "Message its not success"); MainHomePage home = recognitionPage.ClickFinish(); Assert.IsTrue(home.WasUserRewarded(user), user + "was not rewarded"); } }
public void TestInit() { _driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); _driver.Manage().Window.Maximize(); _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); _initialPage = new InitialPage(_driver); _loginPage = new LoginPage(_driver); }
public DemoStoreTest(EnvironmentFixture fixture) { _fixture = fixture; _initialPage = new InitialPage(_fixture.Driver); _resultSearchPage = new ResultSearchPage(_fixture.Driver); _viewCartPage = new ViewCartPage(_fixture.Driver); _checkoutPage = new CheckoutPage(_fixture.Driver); _detailsProductPage = new DetailsProductPage(_fixture.Driver); }
public App() { InitializeComponent(); DependencyService.Register <MockDataStore>(); var mainPage = new InitialPage(); InitializeNavigation(mainPage); MainPage = new NavigationPage(mainPage); }
public static Pageable From(InitialPage initialPage) { return(new Pageable( initialPage.Link, initialPage.Page, initialPage.PerPage, 1, initialPage.Direction )); }
//WS-65 public void Mall_LeftPanelFilters_WS_65() { if (false) { Assert.Ignore(); } else { MainHomePage menuPage = InitialPage.Go().Logon().ClickLogin(); GoToMallHomePage mallPage = menuPage.NavigateToMall(); Assert.AreEqual(" By Price:", mallPage.GetFilterTitleText(0), "The subtitle is not the right one"); Assert.AreEqual(" Under $25", mallPage.GetFilterChkTypeByPrice(0), "The category to filter it's wrong labeled"); Assert.AreEqual(" $25 - $50", mallPage.GetFilterChkTypeByPrice(1), "The category to filter it's wrong labeled"); mallPage.CheckOptionByPrice("Under $25"); Assert.IsTrue(mallPage.FilterByPriceUnderWorks("$25"), "The Filter Under $25 is not working"); mallPage.CheckOptionByPrice("Under $25"); mallPage.CheckOptionByPrice("$25 - $50"); Assert.IsTrue(mallPage.FilterByPriceUnderWorks("$25"), "The Filter $25 - $50 is not working"); /*Assert.AreEqual(" $50 - $100", mallPage.GetFilterChkTypeByPrice(2), "The category to filter it's wrong labeled"); * Assert.AreEqual(" $100 - $250", mallPage.GetFilterChkTypeByPrice(3), "The category to filter it's wrong labeled"); * Assert.AreEqual(" $250 - $500", mallPage.GetFilterChkTypeByPrice(4), "The category to filter it's wrong labeled"); * Assert.AreEqual(" $500 +", mallPage.GetFilterChkTypeByPrice(5), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Purchase Type:", mallPage.GetFilterTitleText(1), "The subtitle is not the right one"); * Assert.AreEqual(" Email (Instant)", mallPage.GetFilterChkTypeByPurchase(0), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Mail (A Few Days)", mallPage.GetFilterChkTypeByPurchase(1), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Multi-Store !", mallPage.GetFilterChkTypeByPurchase(2), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Categories:", mallPage.GetFilterTitleText(2), "The subtitle is not the right one"); * Assert.AreEqual(" Featured", mallPage.GetFilterChkTypeByCategory(9), "The category to filter it's wrong labeled"); * Assert.AreEqual(" All", mallPage.GetFilterChkTypeByCategory(10), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Accessories", mallPage.GetFilterChkTypeByCategory(11), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Apparel & Shoes", mallPage.GetFilterChkTypeByCategory(12), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Babies and Kids", mallPage.GetFilterChkTypeByCategory(13), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Bed & Bath", mallPage.GetFilterChkTypeByCategory(14), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Books and Music", mallPage.GetFilterChkTypeByCategory(15), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Décor", mallPage.GetFilterChkTypeByCategory(16), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Department Stores", mallPage.GetFilterChkTypeByCategory(17), "The category to filter it's wrong labeled"); * Assert.AreEqual(" DVD's and Movies", mallPage.GetFilterChkTypeByCategory(18), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Electronics", mallPage.GetFilterChkTypeByCategory(19), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Food and Wine", mallPage.GetFilterChkTypeByCategory(20), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Gifts", mallPage.GetFilterChkTypeByCategory(21), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Health & Beauty", mallPage.GetFilterChkTypeByCategory(22), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Home & Garden", mallPage.GetFilterChkTypeByCategory(23), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Jewelry & Watches", mallPage.GetFilterChkTypeByCategory(24), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Kitchen & Cooking", mallPage.GetFilterChkTypeByCategory(25), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Office", mallPage.GetFilterChkTypeByCategory(26), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Pets", mallPage.GetFilterChkTypeByCategory(27), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Restaurants", mallPage.GetFilterChkTypeByCategory(28), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Sports and Fitness", mallPage.GetFilterChkTypeByCategory(29), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Toys and Games", mallPage.GetFilterChkTypeByCategory(30), "The category to filter it's wrong labeled"); * Assert.AreEqual(" Travel & Entertainment", mallPage.GetFilterChkTypeByCategory(31), "The category to filter it's wrong labeled");*/ } }
public void WS_1360() { if (!DataParser.ReturnExecution("WS_1360")) { Assert.Ignore(); } else { MainHomePage home = InitialPage.Go().Logon().ClickLogin(); switch (client) { case "HSS": { var promobox = home.GetPromoBoxHref("Right"); home.ClickPromoBoxBtn("Right"); Assert.AreEqual(promobox, home.GetCurrentUrl(), "The urls are not the same"); break; } case "WellCare": { var promobox = home.GetPromoBoxHref("Right"); home.ClickPromoBoxBtn("Right"); Assert.AreEqual(promobox, home.GetCurrentUrl(), "The urls are not the same"); break; } case "Pinnacol": { var promobox = home.GetPromoBoxHrefAngular("Right"); home.ClickPromoBoxBtnAngular("Right"); Assert.AreEqual(promobox + "#/", home.GetCurrentUrl(), "The urls are not the same"); break; } case "BAE": { var promobox = home.GetPromoBoxHref("Right"); home.ClickPromoBoxBtn("Right"); Assert.AreEqual(promobox, home.GetCurrentUrl(), "The urls are not the same"); break; } case "StElizabeth": { var promobox = home.GetPromoBoxHrefAngular("Right"); home.ClickPromoBoxBtnAngular("Right"); Assert.AreEqual(promobox, home.GetCurrentUrl(), "The urls are not the same"); break; } } } }
public void ShouldBeAbleToLogin() { InitialPage.GoTo(); var subscribeLocator = By.XPath("//span[contains(@class, 'title') and text() = 'Subscribe to Gogroopie']"); var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10)); wait.Until(ExpectedConditions.ElementIsVisible(subscribeLocator)); Assert.IsTrue(InitialPage.IsAt(), "Failed to load tha page."); Assert.IsTrue(InitialPage.IsAtSubscribeToGogroopie(Driver.Instance, subscribeLocator), "Not at subscribe screen."); }
public void HomePage_LeftNavigationBar_WS_1302() { if (false) { Assert.Ignore(); } else { MainHomePage home = InitialPage.Go().Logon().ClickLogin(); Assert.IsTrue(home.IsMenuArrowExpanded(), "Arrow is not expanded to see the links"); } }