*** Settings *** Documentation Surcharges des ressources du framework (librairies, ressources, variables et keywords). # Resource core/om_resources.robot *** Variables *** ${SERVER} localhost ${PROJECT_NAME} openresultat ${BROWSER} firefox ${DELAY} 0 ${RESOURCES} resources ${ADMIN_USER} admin ${ADMIN_PASSWORD} admin ${PROJECT_URL} http://${SERVER}/${PROJECT_NAME}/ ${PATH_BIN_FILES} ${EXECDIR}${/}binary_files${/} ${TITLE} openRésultat ${LOGIN URL} http://${SERVER}/openresultat/ ${WELCOME URL} http://${SERVER}/openresultat/scr/dashboard.php ${ERROR URL} http://${SERVER}/openresultat/spg/login.php?step=1 *** Keywords *** For Suite Setup # Les keywords définit dans le resources.robot sont prioritaires Set Library Search Order resources Open Browser To Login Page For Suite Teardown Close Browser For Test Setup [Arguments] ${username} ${password} Go To Login Page Login Page Should Be Open Input Username ${username} Input Password ${password} Submit Credentials Display Menu Rubrik Login Element Should Contain css=#ssmenu7 (Dé)Connexion Page Should Not Contain Errors Open Browser To Login Page Open Browser ${LOGIN URL} ${BROWSER} Maximize Browser Window Set Selenium Speed ${DELAY} Click Link css=#enteteindex a.lienindex Login Page Should Be Open Login Page Should Be Open Element Should Contain css=#identifier table.connexion td.titre_ident I D E N T I F I E Z - V O U S Title Should Be openRésultat Go To Login Page Go To ${LOGIN URL} Click Link css=#enteteindex a.lienindex Login Page Should Be Open Page Should Not Contain Errors Go To Dashboard Click Link css=#logo h1 a.logo Page Title Should Be Tableau De Bord Page Should Not Contain Errors Input Username [Arguments] ${username} Input Text login ${username} Input Password [Arguments] ${password} Input Text pwd ${password} Submit Credentials Click Button css=#identifier input.boutonFormulaire Error On Login Page Should Be Open Location Should Be ${ERROR URL} ELement Should Contain css=#msglogin incorrect, recommencez... Welcome Page Should Be Open Location Should Be ${WELCOME URL} Element Text Should Be css=#entete Tableau de bord Element Should Contain css=#content p Bienvenue Login With Credentials [Arguments] ${username} ${password} Open Browser To Login Page Input Username ${username} Input Password ${password} Submit Credentials Display Menu Rubrik Login Element Should Contain css=#ssmenu7 (Dé)Connexion Page Should Not Contain Errors Logout Display Menu Rubrik Login Click Link link=(Dé)Connexion Login Page Should Be Open Page Should Not Contain Errors Click On Back Button Click Element css=a.retour Page Should Not Contain Errors Display Menu Rubrik [Arguments] ${rubrikname} Run Keyword If '${rubrikname}'=='Configuration' Mouse Over css=#menu2 Run Keyword If '${rubrikname}'=='Saisie' Mouse Over css=#menu3 Run Keyword If '${rubrikname}'=='Affichage' Mouse Over css=#menu4 Run Keyword If '${rubrikname}'=='Paramétrage' Mouse Over css=#menu6 Run Keyword If '${rubrikname}'=='Login' Mouse Over css=#menu7 Click On Menu Element In Rubrik [Arguments] ${rubrikname} ${elemname} Display Menu Rubrik ${rubrikname} Click Link ${elemname} Page Should Not Contain Errors Page Title Should Be [Arguments] ${messagetext} Wait Until Element Is Visible css=#entete Element Text Should Be css=#entete ${messagetext} First Tab Title Should Be [Arguments] ${messagetext} Element Text Should Be css=#formulaire ul.ui-tabs-nav li a ${messagetext} Page Should Not Contain Errors Sleep 0.2 Page Should Not Contain Erreur de base de données. Page Should Not Contain Fatal error Page Should Not Contain Parse error Page Should Not Contain Deprecated Message Should Be [Arguments] ${messagetext} Element Text Should Be css=div.message p span.text ${messagetext} Error Message Should Contain [Arguments] ${messagetext} Element Should Contain css=div.message.ui-state-error p span.text ${messagetext} Error Message Should Be [Arguments] ${messagetext} Element Text Should Be css=div.message.ui-state-error p span.text ${messagetext} Valid Message Should Contain [Arguments] ${messagetext} Element Should Contain css=table.formErreur ${messagetext}