Key points
We will record a short scenario: logging in to the practice site with user_basic.
Hands-on exercise
- Run
npx playwright codegen https://playground.atidcollege.co.il/. - In the browser window, click the Username field and type
user_basic. - Click the Password field and type
secret. - Click Login.
- In the toolbar click Assert visibility and then the ATID Automation Playground heading. This adds a check: not just doing, but also verifying.
- In the Inspector click Copy, or close the window if you used
-o.
Good to know
- Click slowly. Every click and keystroke is recorded.
- Clicked by mistake? You can delete a line of code after recording.
- Other demo users (
user_locked,user_expired) show an error message. Try recording them too, and check the message with Assert text.