Skip to content

uts-itd/uts-chinese-website-ui-test

Repository files navigation

uts-chinese-website-ui-test


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.

Example and usage

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.

Runthrough Breakdown

  1. It will first check whether the website has a valid certificate by checking whether the URL starts with 'https://'
  2. 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.
  3. First it will click through the first 4 blue dots to browse through the articles
  4. Simply hover down to the video below those buttons
  5. It will click on the "Faculty and Course" section in blue under the video previously. Hint: It has these chinese words: 院系
  6. Wait until the page is fully loaded then it will click on the contact form button (联系我们)
  7. This page will load a form and it will use the fill_survey() to complete the form (it will not be submitted)
  8. This will fill out everything on the form and will dabble on some of the dropdown bars.
  9. Then it will go back to the home page to click on the "World Rankings" section (Hint: It has these chinese words: 排名)
  10. Then it will click on the "Course Pathways" sidebar at the top of the page (Hint: It has these chinese words: 入读)
  11. Then it will click on the "How to Apply" sidebar next to the "Course Pathways" sidebar (申请指南)
  12. Then it will click on the "News" sidebar next to the "How to Apply" sidebar (UTS新闻)
  13. Then it will click on the search icon right at the top of the page to search for "uts"
  14. Then it will go back to the home page via the UTS icon at the top left of the page

Demo(s)

An example of the script sucessfully running on GitHub:

Branches:

  • main, selenium-grid: Run tests on Selenium Grid

Contributing

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages