/punch-card

Logs into your portal of choice twice a day to sign in and out respectively.

Primary LanguageJavaScriptMIT LicenseMIT

Punch card automation

Punch card automation

Logs into the portal twice a day to sign in and out respectively.

Tech stack

  1. Playwright - Browser automation
  2. Github actions - Scheduling

Using it

Everything is already setup to run with zero configuration.

  • Fork the repository
  • Provide the URL of the portal, the username and password to login with in the forked repository's secrets panel

How to access secrets panel

  • Add three secrets with keys URL, USR and PASS Secrets configuration

Configuration

  1. You can choose the schedule times that the action will be triggered

Keep in mind that Github chooses when to run the action and sometimes will be delayed upto 1 hour

  1. By default, the actions are triggered at 3AM and 12PM UTC time
  2. cron: "0 3,12 * * 1,2,3,4,5
  3. Change the 3 and 12 above to your choice of schedule here

Local testing

  • Clone the repository git clone https://github.com/Anilturaga/punch-card.git
  • Install dependencies npm ci
  • Install playwright browser(Chromium) npx playwright install --with-deps chromium
  • Make changes to the playwright test file punchCard.spec.js
  • Execute the test npx playwright test --headed