public void Recognition_ApprovalNonMon_WS_921() { if (!DataParser.ReturnExecution("WS_921")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_921.xml"; string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file), amount = AwardData.GetAwardAmountValue(_file), impact = AwardData.GetAwardImpact(_file), printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), reason = AwardData.GetAwardReason(_file), proxy_name = ProxyData.GetProxyUserName(_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(); recognitionPage .SearchEmployeeFound(user) .SelectAward(award) .SelectValues(value) .FillMsg(msg); if (reason != "") { recognitionPage.FillReason(reason); } recognitionPage.ClickNext(); recognitionPage.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); 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"); Assert.AreEqual("FINISH", recognitionPage.GetBtnFinishLabel(), "Button finish its not correct write"); Assert.AreEqual("RECOGNIZE", recognitionPage.GetBtnRecognizOtherLabel(), "Button finish its not correct write"); AdminHomePage proxy = recognitionPage.ExitProxy(); home = proxy.LoginProxyAsuser().EnterUserName(user).ProxyToMainHomePage(); Assert.IsTrue(home.IsPopUpRecognitionShow(), "Pop up recognition is not showing up"); MyAwards awards = home.ClosePopUp().NavigateToMyAwards(); Assert.AreEqual(award, awards.GetAwardName(1, 4), "The last award that someone gave you is not present"); awards.OpenDetailsAward(1, 7); } }
public void Recognition_UploadAttachments_WS_1166_Sample3() { if (!DataParser.ReturnExecution("WS_1166")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1166.xml"; AwardData.GetAwardImpact(_file); string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file), secondvalue = AwardData.GetAwardSecondValue(_file), file_name = GeneralData.GetFileName(_file), reason = AwardData.GetAwardMessage(_file), path_file = GeneralData.GetPathFile(_file).Trim(), proxy_name = ProxyData.GetProxyUserName(_file); //Scenario 2 NominationHomePage recognitionPage = InitialPage.Go().Logon().ClickLogin().NavigateToAdminHomePage().LoginProxyAsuser() .EnterUserName(proxy_name).ProxyToMainHomePage().ClosePopUp().NavigateToNomination(); recognitionPage .SearchEmployeeFound(user) .SelectAward(award) .SelectValues(value) .SelectValues(secondvalue) .FillReason(reason); recognitionPage.ClickUploadFile(); for (var i = 0; i < 5; i++) { foreach (char a in path_file) { SendKeys.SendWait(a.ToString()); Thread.Sleep(30); } SendKeys.SendWait("{ENTER}"); } Assert.AreEqual("You can not upload any more files", recognitionPage.GetErrorMsgupload5Files(), "The file was upload correctly or the msg is not right"); } }
public void Recognition_AwardDeliveryTypes_WS_218() { if (!DataParser.ReturnExecution("WS_218")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_218.xml"; AwardData.GetAwardImpact(_file); string user = AwardData.GetAwardUserName(_file), award = AwardData.GetAwardName(_file), value = AwardData.GetAwardValue(_file), amount = AwardData.GetAwardAmountValue(_file), printype = AwardData.GetAwardDeliverType(_file), msg = AwardData.GetAwardMessage(_file), reason = AwardData.GetAwardMessage(_file); NominationHomePage recognitionPage = InitialPage.Go().Logon().ClickLogin().NavigateToNomination(); recognitionPage .SearchEmployeeFound(user) .SelectAward(award) .SelectValueOfAward(amount) .SelectValues(value) .FillMsg(msg) .FillReason(reason).ClickNext(); 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.DeliverType(printype); Assert.AreEqual(2, recognitionPage.GetCountEditLnk(), "Edit links are not two"); 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"); Assert.AreEqual("FINISH", recognitionPage.GetBtnFinishLabel(), "Button finish its not correct write"); Assert.AreEqual("RECOGNIZE", recognitionPage.GetBtnRecognizOtherLabel(), "Button finish its not correct write"); } }