12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- *** Settings ***
- Library SeleniumLibrary
- *** Variables ***
- ${PAGE_LOGIN_HEADER_LOCATOR}= css=h1
- ${EMAIL_TEXTBOX_LOCATOR}= id=email
- ${PASSWORD_TEXTBOX_LOCATOR}= id=password
- ${LOGIN_BUTTON_LOCATOR}= xpath=//*[@id="root"]/div/div/div/div/form/div[2]/button
- ${CREATE_ACCOUNT_LINK_LOCATOR}= xpath=//*[@id="root"]/div/div/div/div/div[3]/a
- ${FORGOT_PASSWORD_LINK_LOCATOR}= id=forgotPasswordLink
- ${MESSAGE_ALERTE_INCORRECT_LOGIN_LOCATOR}= xpath=//*[@id="root"]/div/div/div/div/div[1]/div/div/div
- ${MESSAGE_PWDREQUIRED_LOCATOR}= xpath=//*[@id="root"]/div/div/div/div/form/div[1]/div[2]/div
- ${MESSAGE_EMAILFORMAT_LOCATOR}= xpath=//*[@id="root"]/div/div/div/div/form/div[1]/div[1]/div
- *** Keywords ***
- Vérifier l'affichage de la page "Login"
- ${Page_login_header_text}= Get Text ${PAGE_LOGIN_HEADER_LOCATOR}
- Should Be Equal As Strings ${Page_login_header_text} Login ignore_case=true
- Remplir le formulaire de login
- [Arguments] @{Donnees_Login}
- Input Text ${EMAIL_TEXTBOX_LOCATOR} ${Donnees_Login}[0]
- Input Text ${PASSWORD_TEXTBOX_LOCATOR} ${Donnees_Login}[1]
- Soumettre le formulaire de Login
- Click Button ${LOGIN_BUTTON_LOCATOR}
- Cliquer sur le lien "Create a free account"
- Click Element ${CREATE_ACCOUNT_LINK_LOCATOR}
- Cliquer sur le lien "Forgot Password"
- Click Element ${FORGOT_PASSWORD_LINK_LOCATOR}
-
- Vérifier Login KO - email ou pwd incorrect
- ${Current_Page_Url}= Get Location
- Should Be Equal As Strings ${Current_Page_Url} https://practice.expandtesting.com/notes/app/login
- Wait Until Element Is Visible ${MESSAGE_ALERTE_INCORRECT_LOGIN_LOCATOR}
- ${Text_message_alerte}= Get Text ${MESSAGE_ALERTE_INCORRECT_LOGIN_LOCATOR}
- Should Be Equal As Strings ${Text_message_alerte} Incorrect email address or password ignorecase=true
- Vérifier Login KO - champ pwd vide
- ${Current_Page_Url}= Get Location
- Should Be Equal As Strings ${Current_Page_Url} https://practice.expandtesting.com/notes/app/login
- Wait Until Element Is Visible ${MESSAGE_PWDREQUIRED_LOCATOR}
- ${Text_message_alerte}= Get Text ${MESSAGE_PWDREQUIRED_LOCATOR}
- Should Be Equal As Strings ${Text_message_alerte} Password is required ignorecase=true
- Vérifier Login KO - pwd lenght KO
- ${Current_Page_Url}= Get Location
- Should Be Equal As Strings ${Current_Page_Url} https://practice.expandtesting.com/notes/app/login
- Wait Until Element Is Visible ${MESSAGE_PWDREQUIRED_LOCATOR}
- ${Text_message_alerte}= Get Text ${MESSAGE_PWDREQUIRED_LOCATOR}
- Should Be Equal As Strings ${Text_message_alerte} Password should be between 6 and 30 characters ignorecase=true
- Vérifier Login KO - format email invalide
- ${Current_Page_Url}= Get Location
- Should Be Equal As Strings ${Current_Page_Url} https://practice.expandtesting.com/notes/app/login
- Wait Until Element Is Visible ${MESSAGE_EMAILFORMAT_LOCATOR}
- ${Text_message_alerte}= Get Text ${MESSAGE_EMAILFORMAT_LOCATOR}
- Should Be Equal As Strings ${Text_message_alerte} Email address is invalid ignorecase=true
|