your_app/page/abstract_alert_page.rb
# INFO: Good Practice
# Example #7 - use full system checks to verify optional elements
Good Practice
Example #7 - use full system checks to verify optional elements
Good Practice Example #7 - use full system checks to verify optional elements
def verify_alert(title: nil, description:, first_button:, last_button: nil)
      ui.wait_for_elements_displayed(MESSAGE, FIRST_ALERT_BUTTON)
      ui.wait_for_optional_element_text(expected_lexeme: title, locator: TITLE)
      ui.wait_for_element_text(expected_lexeme: description, locator: MESSAGE)
      ui.wait_for_element_text(expected_lexeme: first_button, locator: FIRST_BUTTON)
      ui.wait_for_optional_element_text(expected_lexeme: last_button, locator: LAST_BUTTON)
    end
def verify_alert ( title : nil , description : , first_button : , last_button : nil ) ui . wait_for_elements_displayed ( MESSAGE , FIRST_ALERT_BUTTON ) ui . wait_for_optional_element_text ( expected_lexeme : title , locator : TITLE ) ui . wait_for_element_text ( expected_lexeme : description , locator : MESSAGE ) ui . wait_for_element_text ( expected_lexeme : first_button , locator : FIRST_BUTTON ) ui . wait_for_optional_element_text ( expected_lexeme : last_button , locator : LAST_BUTTON ) end
INFO: Good Practice
Example #7 - use full system checks to verify optional elements
INFO : Good Practice Example #7 - use full system checks to verify optional elements
title
<not_specific>
description
<not_specific>
first_button
<not_specific>
last_button
<not_specific>