public void SetEmployeeDataAndView(String strEmployeeName, String date) { TxtEmployeeName.Should(Be.Visible).SetValue(strEmployeeName); EmployeeSearchResultSection.Should(Have.Text(strEmployeeName)).Click(); // Set date via JS. Selene.ExecuteScript( @" document.getElementById('attendance_date') .value = " + '"' + date + '"' + "" ); BtnView.Click(); TableResults.Should(Be.Visible); }
public void NavigateToMenuItem(String strItem) { switch (strItem) { case "Time": TimeMenuItem.Should(Be.Visible).Click(); break; case "Attendance": AttendanceMenuItem.Should(Be.Visible).Click(); break; case "Employee Records": EmployeeRecordsMenuItem.Should(Be.Visible).Click(); employeeAttendanceRecordsPage.IsLoaded(); break; default: throw new NotSupportedException(string.Format("'{0}' menu item is not supported now.", strItem)); } }
public static SeleneElement AssertTo(this SeleneElement selement, Condition <SeleneElement> condition) { return(selement.Should(condition)); }
private void Login(String txtUserName, String txtUserPassword) { TxtUsernameField.Should(Be.Visible).SetValue(txtUserName); TxtPasswordField.Should(Be.Visible).SetValue(txtUserPassword); BtnLogin.Click(); }
public void IsLoaded() { NavBar.Should(Have.ExactText(DASHBOARD_PAGE_TITLE)); }
public void IsLoaded() { // Switching to Frame to be able to interact with elements. GetWebDriver().SwitchTo().Frame(0); NavBar.Should(Have.ExactText(ATTENDANCE_RECORDS_PAGE_TITLE)); }