|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: "Facilitator Guide — 1-Hour Delivery" |
| 4 | +nav_exclude: true |
| 5 | +description: "Instructor guide for delivering the Playwright 101 workshop in a 1-hour session with timing, setup checklist, and talking points." |
| 6 | +--- |
| 7 | + |
| 8 | +## Audience |
| 9 | + |
| 10 | +This guide is intended for the workshop facilitator or instructor delivering the |
| 11 | +Playwright 101 workshop in a 1-hour format. |
| 12 | + |
| 13 | +## Pre-Workshop Checklist |
| 14 | + |
| 15 | +- Verify ontario.ca/search is accessible (load |
| 16 | + <https://www.ontario.ca/search?query=driver+licence> in a browser) |
| 17 | +- Confirm the GitHub Pages site is live at |
| 18 | + <https://devopsabcs-engineering.github.io/playwright-101/> |
| 19 | +- Test all Playwright tests pass locally: `cd playwright-tests && npx playwright test` |
| 20 | +- Ensure attendees received the prerequisites link (Lab 00 URL) |
| 21 | +- Verify Wi-Fi and projector or screen sharing work |
| 22 | + |
| 23 | +## Agenda |
| 24 | + |
| 25 | +| Time | Activity | Notes | |
| 26 | +|------|----------|-------| |
| 27 | +| 0:00–0:02 | Welcome and overview | Share GitHub Pages URL | |
| 28 | +| 0:02–0:12 | Lab 01: Test Planning | Instructor-led walkthrough | |
| 29 | +| 0:12–0:32 | Lab 02: Playwright Basics | Hands-on with instructor support | |
| 30 | +| 0:32–0:47 | Lab 03: Copilot Testing | Hands-on; have fallback for no Copilot | |
| 31 | +| 0:47–0:57 | Lab 04: CI Pipeline | Demo + guided configuration | |
| 32 | +| 0:57–1:00 | Wrap-up and Q&A | Share resources | |
| 33 | + |
| 34 | +## Key Talking Points |
| 35 | + |
| 36 | +### Lab 01: Test Planning |
| 37 | + |
| 38 | +Automation starts with good requirements. User stories bridge the gap between |
| 39 | +business needs and test cases. Encourage participants to think about acceptance |
| 40 | +criteria before writing any code. |
| 41 | + |
| 42 | +### Lab 02: Playwright Basics |
| 43 | + |
| 44 | +Highlight Playwright's auto-waiting behavior, which eliminates the need for |
| 45 | +explicit waits. Walk through multiple locator strategies (role, text, CSS, test ID) |
| 46 | +and demonstrate the Trace Viewer for debugging failed tests. |
| 47 | + |
| 48 | +### Lab 03: Copilot-Assisted Testing |
| 49 | + |
| 50 | +Introduce the two-prompt technique: provide context first, then make the request. |
| 51 | +Remind participants to always validate Copilot output against the live site, because |
| 52 | +generated selectors may not match current page structure. |
| 53 | + |
| 54 | +### Lab 04: CI Pipeline |
| 55 | + |
| 56 | +CI/CD ensures tests run on every code change, catching regressions early. Artifacts |
| 57 | +provide historical test reports that the team can review without re-running tests. |
| 58 | + |
| 59 | +## Common Issues and Solutions |
| 60 | + |
| 61 | +| Issue | Solution | |
| 62 | +|-------|----------| |
| 63 | +| Node.js version mismatch | Verify `node --version` shows v20+; use nvm to switch | |
| 64 | +| Tests timeout on first run | ontario.ca React SPA needs warm-up; increase timeout or retry | |
| 65 | +| Language splash page appears | Cookie handling in beforeEach should prevent this; verify cookie domain is `.ontario.ca` | |
| 66 | +| Selector not found | ontario.ca may update HTML; check selectors against live page | |
| 67 | +| npm install fails | Clear node_modules and package-lock.json, retry | |
| 68 | +| Copilot not available | Provide manual code snippets as fallback; lab exercises include expected output | |
| 69 | + |
| 70 | +## Fallback Plan |
| 71 | + |
| 72 | +If ontario.ca is down during the workshop: |
| 73 | + |
| 74 | +- Use cached screenshots to demonstrate concepts |
| 75 | +- Discuss the test approach theoretically |
| 76 | +- Show the test code and explain expected behavior |
| 77 | +- Reschedule hands-on execution for a follow-up session |
| 78 | + |
| 79 | +## Resources and Further Learning |
| 80 | + |
| 81 | +- [Playwright Documentation](https://playwright.dev) |
| 82 | +- [Microsoft Learn: End-to-end testing with Playwright](https://learn.microsoft.com/en-us/training/modules/build-with-playwright/) |
| 83 | +- [GitHub Actions Documentation](https://docs.github.com/en/actions) |
| 84 | +- [Azure Test Plans](https://learn.microsoft.com/en-us/azure/devops/test/overview) |
0 commit comments