public void UserEntersValidValuesInCreateAccountingPeriodForm() { if (contrLang.LanguageDropDown().Text.Contains("EN")) { AccountingPeriodsPage.MonthSel().SendKeys(month_select); AccountingPeriodsPage.ClearAccPeriodAllFields(); AccountingPeriodsPage.CreateClaimIssueData().SendKeys(AccountingPeriodsPage.MonthSel().GetAttribute("value") + "/1/" + year); AccountingPeriodsPage.CreateClaimPaymentData().SendKeys(AccountingPeriodsPage.MonthSel().GetAttribute("value") + "/28/" + year); AccountingPeriodsPage.AccPeriodsCreateYear().Click(); AccountingPeriodsPage.AccPeriodsCreateYear().SendKeys(year); //AccountingPeriodsPage.ActiveCheckbox().Click(); AccountingPeriodsPage.CreateAccButton().Click(); Assert.AreEqual("http://intnstest:50080/AccountingPeriods", Driver.Url); Assert.AreEqual(month_select + " " + year, AccountingPeriodsPage.TableAccPeriod().FindElement(By.XPath("//td[1][contains(string(), '" + month_select + " " + year + "')]")).Text); } else { AccountingPeriodsPage.MonthSel().SendKeys(month_select_rs); AccountingPeriodsPage.ClearAccPeriodAllFields(); AccountingPeriodsPage.CreateClaimIssueData().SendKeys("1." + AccountingPeriodsPage.MonthSel().GetAttribute("value") + "." + year + "."); AccountingPeriodsPage.CreateClaimPaymentData().SendKeys("28." + AccountingPeriodsPage.MonthSel().GetAttribute("value") + "." + year + "."); AccountingPeriodsPage.AccPeriodsCreateYear().Click(); AccountingPeriodsPage.AccPeriodsCreateYear().SendKeys(year); //AccountingPeriodsPage.ActiveCheckbox().Click(); AccountingPeriodsPage.CreateAccButton().Click(); Assert.AreEqual("http://intnstest:50080/AccountingPeriods", Driver.Url); Assert.AreEqual(month_select_rs + " " + year, AccountingPeriodsPage.TableAccPeriod().FindElement(By.XPath("//td[1][contains(string(), '" + month_select_rs + " " + year + "')]")).Text); } }
public void UserEntersValidValuesInCreateAccountingPeriodForm() { if (contrLang.LanguageDropDown().Text.Contains("EN")) { AdminAccountingPeriods.MonthSel().SendKeys(month_select); AdminAccountingPeriods.ClearAccPeriodAllFields(); AdminAccountingPeriods.CreateClaimIssueData().SendKeys(AdminAccountingPeriods.MonthSel().GetAttribute("value") + "/1/" + year); AdminAccountingPeriods.CreateClaimPaymentData().SendKeys(AdminAccountingPeriods.MonthSel().GetAttribute("value") + "/28/" + year); AdminAccountingPeriods.AccPeriodsCreateYear().Click(); AdminAccountingPeriods.AccPeriodsCreateYear().SendKeys(year); //AdminAccountingPeriods.ActiveCheckbox().Click(); AdminAccountingPeriods.CreateAccButton().Click(); Assert.AreEqual("http://intnstest:50080/AccountingPeriods", Driver.Url); } else { AdminAccountingPeriods.MonthSel().SendKeys(month_select_rs); AdminAccountingPeriods.ClearAccPeriodAllFields(); AdminAccountingPeriods.CreateClaimIssueData().SendKeys("1." + AdminAccountingPeriods.MonthSel().GetAttribute("value") + "." + year + "."); AdminAccountingPeriods.CreateClaimPaymentData().SendKeys("28." + AdminAccountingPeriods.MonthSel().GetAttribute("value") + "." + year + "."); AdminAccountingPeriods.AccPeriodsCreateYear().Click(); AdminAccountingPeriods.AccPeriodsCreateYear().SendKeys(year); //AdminAccountingPeriods.ActiveCheckbox().Click(); AdminAccountingPeriods.CreateAccButton().Click(); Assert.AreEqual("http://intnstest:50080/AccountingPeriods", Driver.Url); } }
public void UserEntersInvalidClaimDateValues() { AdminAccountingPeriods.ClearAccPeriodAllFields(); AdminAccountingPeriods.CreateClaimIssueData().SendKeys(invalid_form + '.' + invalid_form + '.' + invalid_form + invalid_form); AdminAccountingPeriods.CreateClaimPaymentData().SendKeys(invalid_form + '.' + invalid_form + '.' + invalid_form + invalid_form); AdminAccountingPeriods.AccPeriodsCreateYear().SendKeys(year); AdminAccountingPeriods.ClickOnPage().Click(); AdminAccountingPeriods.CreateAccButton().Click(); Assert.AreEqual("http://intnstest:50080/AccountingPeriods/Create", Driver.Url); }