A Robot Framework test project.
Schools in my area use Helmi Oppilashallinto -web application for communication between school and parents. I wanted to receive new messages from school to my email for convenience during working days:
- log in to Helmi web page
- read list of recent messages in inbox
- compile an email of messages that have not been emailed yet
- send email via Gmail API
Tested on Linux, Python3.6, Firefox and Gmail account for sending email:
-
Make sure Firefox and Python 3.6 or newer are installed
-
Open a browser and login to Google API console
- check that Gmail API is enabled in Dashboard
- go to Credentials and create OAuth client ID for type Other and choose a name
- download the created credentials file, place it in project directory and rename it to credentials.json
- open global_variables.py and edit in your Helmi credentials, Google account id and target email
- leave browser open for the first test run
-
Setup virtualenv and webdrivers and start test for the first time
./setup.sh ./run.sh
- you should see a new browser window open
- click through the warnings and give the app permissions to compose and send email.
- If all goes well, browser should display: The authentication flow has completed, you may close this window.
-
See ./Report/log.html for test results
Repeating tests should now be possible just by ./run.sh