All Implemented Interfaces:
Component, Element, Alert, Snippet

public class N2oAlert extends N2oSnippet implements Alert
Компонент предупреждения для автотестирования
  • Constructor Details

    • N2oAlert

      public N2oAlert()
    • N2oAlert

      public N2oAlert(com.codeborne.selenide.SelenideElement element)
  • Method Details

    • shouldHaveColor

      public void shouldHaveColor(ColorsEnum color)
      Description copied from interface: Alert
      Проверка цвета на соответствие
      Specified by:
      shouldHaveColor in interface Alert
      Parameters:
      color - ожидаемый цвет предупреждения
    • shouldHaveTitle

      public void shouldHaveTitle(String text, Duration... duration)
      Description copied from interface: Alert
      Проверка заголовка на соответствие
      Specified by:
      shouldHaveTitle in interface Alert
      Parameters:
      text - ожидаемый заголовок предупреждения
    • shouldHaveUrl

      public void shouldHaveUrl(String url)
      Description copied from interface: Alert
      Проверка ссылки на соответвие
      Specified by:
      shouldHaveUrl in interface Alert
      Parameters:
      url - ожидаемая ссылка
    • shouldHaveStacktrace

      public void shouldHaveStacktrace()
      Description copied from interface: Alert
      Проверка того, что предупреждение содержит дополнительную информацию
      Specified by:
      shouldHaveStacktrace in interface Alert
    • shouldHaveText

      public void shouldHaveText(String text, Duration... duration)
      Description copied from interface: Snippet
      Проверка текста на соответствие
      Specified by:
      shouldHaveText in interface Snippet
      Parameters:
      text - ожидаемый текст
    • shouldHaveTimestamp

      public void shouldHaveTimestamp(String timestamp, Duration... duration)
      Description copied from interface: Alert
      Проверка того, что предупреждение содержит информацию о времени
      Specified by:
      shouldHaveTimestamp in interface Alert
    • shouldNotExists

      public void shouldNotExists(Duration... duration)
      Description copied from interface: Component
      Проверка отсутствия компонент на странице
      Specified by:
      shouldNotExists in interface Alert
      Specified by:
      shouldNotExists in interface Component
      Overrides:
      shouldNotExists in class N2oComponent
      Parameters:
      duration - задержка
    • closeButton

      public Alert.CloseButton closeButton()
      Specified by:
      closeButton in interface Alert
      Returns:
      кнопка закрытия прежупреждения
    • click

      public void click()
      Description copied from interface: Alert
      Клик по предупреждению
      Specified by:
      click in interface Alert