MyNotes_Test_Ex8.robot 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. *** Settings ***
  2. Library String
  3. Library XML
  4. Library SeleniumLibrary
  5. Resource ../Resources/Common.robot
  6. Resource ../Resources/Page Object/PageAccueil.resource
  7. Resource ../Resources/Page Object/PageLogin.resource
  8. Resource ../Resources/Page Object/PageCreateAccount.resource
  9. Test Setup Common.Démarrer Test
  10. Test Teardown Common.Terminer Test
  11. Documentation Ex8: Réinitialisation du mdp Ok pour un user avec un compte email validee
  12. *** Variables ***
  13. ${email} dianeteta10@gmail.com
  14. #${ResetSuccessMsg} Password reset successful. Check your email for instructions.
  15. ${password} rutaremara
  16. *** Test Cases ***
  17. Ex8-CT01 - Réinitialisation du mdp Ok pour un user avec un compte email validee
  18. PageAccueil.Cliquer sur "Login"
  19. Login attempt ${email} ${EMPTY}
  20. Resetting the password
  21. *** Keywords ***
  22. Login attempt
  23. [Arguments] ${email} ${password}
  24. Input Text id=email ${email}
  25. Input Text id=password ${EMPTY}
  26. Click Element xpath=//*[@id="forgotPasswordLink"]
  27. Resetting the password
  28. #Filling in the Email adress to receive the reset link
  29. Input Text id=email ${email}
  30. Click Button xpath=//*[@id="forgot-password"]/button
  31. #Verifying if the alert-info message appeared correctly
  32. #${actual_alert_msg}= Get Text xpath=//*[@id="root"]/div/div/div/div/div[2]
  33. #Should Contain ${actual_alert_msg} An e-mail with a link to reset the password has been sent to dianeteta10@gmail.com ignore_case=true
  34. Wait Until Element Is Visible data:testid:login-view
  35. Page Should Contain An e-mail with a link to reset the password has been sent to dianeteta10@gmail.com
  36. #Click to go back to the home page
  37. Click Element xpath=//*[@id="root"]/div/div/div/div/div[2]/div/a/span
  38. #Login in once again to fill in the new information (new password after filling in the email)
  39. PageAccueil.Cliquer sur "Login"
  40. #Filling in the login form after the reset
  41. Input Text id=email ${email}
  42. Input Text id=password ${password}
  43. Click Button xpath=//*[@id="root"]/div/div/div/div/form/div[2]/button
  44. Close Browser