All Implemented Interfaces:
Component, Control, DateInput, Element, PopupControl

public class N2oDateInput extends N2oControl implements DateInput
Компонент ввода даты для автотестирования
  • Constructor Details

    • N2oDateInput

      public N2oDateInput()
  • Method Details

    • shouldBeEmpty

      public void shouldBeEmpty()
      Description copied from interface: Control
      Проверка пустоты поля
      Specified by:
      shouldBeEmpty in interface Control
    • shouldHaveValue

      public void shouldHaveValue(String value, Duration... duration)
      Description copied from interface: Control
      Проверка значения в поле
      Specified by:
      shouldHaveValue in interface Control
      Parameters:
      value - ожидаемое значение
    • getValue

      public String getValue()
      Description copied from interface: DateInput
      Возвращает значение из поля ввода
      Specified by:
      getValue in interface DateInput
      Returns:
      Выбранная дата
    • setValue

      public void setValue(String value)
      Description copied from interface: DateInput
      Установка значения в поле ввода даты

      Пример использования: date.setValue("15.02.2020");

      Specified by:
      setValue in interface DateInput
      Parameters:
      value - значение даты
    • timeButtonShouldHaveLabel

      public void timeButtonShouldHaveLabel(String label)
      Description copied from interface: DateInput
      Проверка текста кнопки времени
      Specified by:
      timeButtonShouldHaveLabel in interface DateInput
      Parameters:
      label - ожидаемое значение текста
    • timeVal

      public void timeVal(String hours, String minutes, String seconds)
      Description copied from interface: DateInput
      Ввод времени

      Пример использования: date.timeVal("23", "59", "58");

      Specified by:
      timeVal in interface DateInput
      Parameters:
      hours - часы в формате 24
      minutes - минуты
      seconds - секунды
    • shouldBeDisabled

      public void shouldBeDisabled()
      Description copied from interface: Control
      Проверка недоступности поля
      Specified by:
      shouldBeDisabled in interface Control
      Overrides:
      shouldBeDisabled in class N2oControl
    • clickCalendarButton

      public void clickCalendarButton()
      Description copied from interface: DateInput
      Клик по иконке календаря в поле ввода для раскрытия календаря
      Specified by:
      clickCalendarButton in interface DateInput
    • shouldBeActiveDay

      public void shouldBeActiveDay(String day)
      Description copied from interface: DateInput
      Проверка выбранности дня в календаре
      Specified by:
      shouldBeActiveDay in interface DateInput
      Parameters:
      day - проверяемый день
    • clickDay

      public void clickDay(String day)
      Description copied from interface: DateInput
      Клик по дню в календаре для выбора
      Specified by:
      clickDay in interface DateInput
      Parameters:
      day - выбираемый день
    • shouldBeDisableDay

      public void shouldBeDisableDay(String day)
      Description copied from interface: DateInput
      Проверка недоступности дня в календаре для выбора
      Specified by:
      shouldBeDisableDay in interface DateInput
      Parameters:
      day - проверяемый день
    • shouldNotBeDisableDay

      public void shouldNotBeDisableDay(String day)
      Description copied from interface: DateInput
      Проверка доступности дня в календаре для выбора
      Specified by:
      shouldNotBeDisableDay in interface DateInput
      Parameters:
      day - проверяемый день
    • shouldHaveCurrentMonth

      public void shouldHaveCurrentMonth(String month, Duration... duration)
      Description copied from interface: DateInput
      Проверка текущего месяца в календаре
      Specified by:
      shouldHaveCurrentMonth in interface DateInput
      Parameters:
      month - ожидаемый текущий месяц
    • shouldHaveCurrentYear

      public void shouldHaveCurrentYear(String year, Duration... duration)
      Description copied from interface: DateInput
      Проверка текущего года в календаре
      Specified by:
      shouldHaveCurrentYear in interface DateInput
      Parameters:
      year - ожидаемый текущий год
    • clickPreviousMonthButton

      public void clickPreviousMonthButton()
      Description copied from interface: DateInput
      Клик по кнопке для перехода к предыдущему месяцу в календаре
      Specified by:
      clickPreviousMonthButton in interface DateInput
    • clickNextMonthButton

      public void clickNextMonthButton()
      Description copied from interface: DateInput
      Клик по кнопке для перехода к следующему месяцу в календаре
      Specified by:
      clickNextMonthButton in interface DateInput
    • shouldHavePlaceholder

      public void shouldHavePlaceholder(String value)
      Description copied from interface: DateInput
      Проверка подсказки для ввода
      Specified by:
      shouldHavePlaceholder in interface DateInput
      Parameters:
      value - ожидаемое значение подсказки
    • openPopup

      public void openPopup()
      Description copied from interface: PopupControl
      Открытие выпадающего списка
      Specified by:
      openPopup in interface PopupControl
    • closePopup

      public void closePopup()
      Description copied from interface: PopupControl
      Закрытие выпадающего списка
      Specified by:
      closePopup in interface PopupControl
    • shouldBeOpened

      public void shouldBeOpened()
      Description copied from interface: PopupControl
      Проверка того, что выпадающий список раскрыт
      Specified by:
      shouldBeOpened in interface PopupControl
    • shouldBeClosed

      public void shouldBeClosed()
      Description copied from interface: PopupControl
      Проверка того, что выпадающий список скрыт
      Specified by:
      shouldBeClosed in interface PopupControl
    • inputElement

      protected com.codeborne.selenide.SelenideElement inputElement()
    • cellInputElement

      protected com.codeborne.selenide.SelenideElement cellInputElement()
    • popUp

      protected com.codeborne.selenide.SelenideElement popUp()
    • calendarDays

      protected com.codeborne.selenide.ElementsCollection calendarDays()