Given the test automation requirement is to automate the login process and create a note on the web application http://testapp.galenframework.com/ how would you approach this?
I would approach it by exploring the app first. I would get familiar with the user flow, what elements I could automate, what checks to implement. I would make notes on this.
Then I would write a pseudocode.
- Launch the web application
- Verify the elements exits
- Click login button
- Input username and password
- Click the login button
- Verify the elements exists on page
- Close the browser
After this I draft my code until the requirement is satisfied. I would test it several times then have someone review it.
After which I can commit it to the main repository as an approved test case.
Of course, the code could still be improved but that’s for another time.
Here is the code I made –https://github.com/kvabapo/tests/blob/master/python_unittest_selenium.py
Comment and let me know your thoughts.