예제 #1
0
 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);
 }
예제 #2
0
        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));
            }
        }
예제 #3
0
 public static SeleneElement AssertTo(this SeleneElement selement, Condition <SeleneElement> condition)
 {
     return(selement.Should(condition));
 }
예제 #4
0
 private void Login(String txtUserName, String txtUserPassword)
 {
     TxtUsernameField.Should(Be.Visible).SetValue(txtUserName);
     TxtPasswordField.Should(Be.Visible).SetValue(txtUserPassword);
     BtnLogin.Click();
 }
예제 #5
0
 public void IsLoaded()
 {
     NavBar.Should(Have.ExactText(DASHBOARD_PAGE_TITLE));
 }
예제 #6
0
 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));
 }