PageAccueil.resource 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. *** Settings ***
  2. Library SeleniumLibrary
  3. Library XML
  4. *** Variables ***
  5. ${LOGIN_BUTTON_LOCATOR_ACCUEIL}= xpath=//*[@id="root"]/div/div/div/div[1]/div[1]/a[1]
  6. ${CREATE_ACCOUNT_BUTTON_LOCATOR}= xpath=//*[@id="root"]/div/div/div/div[1]/div[1]/a[2]
  7. ${LOGOUT_BUTTON_LOCATOR}= xpath=//*[@id="navbarSupportedContent"]/ul/li[2]/button
  8. ${PAGEACCUEIL_CONNECTED_BUTTON_LOGOUT_LOCATOR} = xpath=//*[@id="navbarSupportedContent"]/ul/li[2]/button
  9. *** Keywords ***
  10. Valider l'affichage de la page "Accueil" - non connecté
  11. ${page_url} = Get Location
  12. Should Be Equal As Strings ${page_url} https://practice.expandtesting.com/notes/app/
  13. Wait Until Element Is Visible ${LOGIN_BUTTON_LOCATOR_ACCUEIL}
  14. #Element Should Exist ${LOGIN_BUTTON_LOCATOR}
  15. #Element Should Exist ${CREATE_ACCOUNT_BUTTON_LOCATOR}
  16. Valider l'affichage de la page "Accueil" - connecté
  17. Wait Until Element Is Visible ${LOGOUT_BUTTON_LOCATOR}
  18. ${page_url} = Get Location
  19. Should Be Equal As Strings ${page_url} https://practice.expandtesting.com/notes/app
  20. Cliquer sur "Login"
  21. Click Element ${LOGIN_BUTTON_LOCATOR_ACCUEIL}
  22. Cliquer sur "Create an account"
  23. Click Element ${CREATE_ACCOUNT_BUTTON_LOCATOR}
  24. Cliquer sur "Lougout" - user connecté
  25. Click Element ${PAGEACCUEIL_CONNECTED_BUTTON_LOGOUT_LOCATOR}
  26. Valider l'affichage de la page "Accueil" - user connecté
  27. ${page_url} = Get Location
  28. Should Be Equal As Strings ${page_url} https://practice.expandtesting.com/notes/app/
  29. Wait Until Element Is Visible ${PAGEACCUEIL_CONNECTED_BUTTON_LOGOUT_LOCATOR}