MyNotes_Test_Ex4.robot 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. *** Settings ***
  2. Library String
  3. Library SeleniumLibrary
  4. Resource ../Resources/Common.robot
  5. Resource ../Resources/Page Object/PageAccueil.resource
  6. Resource ../Resources/Page Object/PageLogin.resource
  7. Resource ../Resources/Page Object/PageCreateAccount.resource
  8. Test Setup Common.Démarrer Test
  9. Test Teardown Common.Terminer Test
  10. Documentation Ex4: Affichage message erreur lorsque email vide
  11. *** Variables ***
  12. @{VALEURS_FORMULAIRES_TOUT_OK}= "" 1234567 jean hartin 1234567
  13. *** Test Cases ***
  14. Ex4-CT01 - Affichage message erreur lorsque email vide
  15. PageAccueil.Cliquer sur "Login"
  16. Submit Login Form ${empty} ${VALEURS_FORMULAIRES_TOUT_OK}[1]
  17. Verify Error Message #${EmptyEmailErrorMsg}
  18. *** Keywords ***
  19. Submit Login Form
  20. [Arguments] ${email} ${password}
  21. Input Text id=email ${email}
  22. Input Text id=password ${password}
  23. Click Element xpath=//*[@id="root"]/div/div/div/div/form/div[2]/button
  24. Verify Error Message
  25. ${actual_error_msg}= Get Text xpath=//*[@id="root"]/div/div/div/div/form/div[1]/div[1]/div
  26. Should Be Equal As Strings ${actual_error_msg} Email address is required ignore_case=true
  27. Close Browser