Show your support!
No need to struggle to figure out how to run a Python Selenium script with a GitHub Action.
This is a ready to use template for running Selenium with Python via GitHub Actions on non-headless.
To use Github Action:
-
Push/merge any code to the main branch and it will run the tests on the UTS website on Github Actions
-
Make changes as needed to the Python script
utilities.py
. -
Make changes as needed to the
selenium-action.yaml
file. For Github actions.
- It will first check whether the website has a valid certificate by checking whether the URL starts with 'https://'
- NOTE: The page may take a long time to render. Tests won't start until the image at the top of the website is fully rendered.
- First it will click through the first 4 blue dots to browse through the articles
- Simply hover down to the video below those buttons
- It will click on the "Faculty and Course" section in blue under the video previously. Hint: It has these chinese words: 院系
- Wait until the page is fully loaded then it will click on the contact form button (联系我们)
- This page will load a form and it will use the fill_survey() to complete the form (it will not be submitted)
- This will fill out everything on the form and will dabble on some of the dropdown bars.
- Then it will go back to the home page to click on the "World Rankings" section (Hint: It has these chinese words: 排名)
- Then it will click on the "Course Pathways" sidebar at the top of the page (Hint: It has these chinese words: 入读)
- Then it will click on the "How to Apply" sidebar next to the "Course Pathways" sidebar (申请指南)
- Then it will click on the "News" sidebar next to the "How to Apply" sidebar (UTS新闻)
- Then it will click on the search icon right at the top of the page to search for "uts"
- Then it will go back to the home page via the UTS icon at the top left of the page
An example of the script sucessfully running on GitHub:
- main, selenium-grid: Run tests on Selenium Grid
Want to improve this? Create a pull request with detailed changes / improvements! If approved you will be added to the list of contributors of this awesome project!
See also the list of contributors who participate in this project.