About Testing Forms with Selenium
When testing form fields with Selenium, you have two options: send key presses to HTML elements or perform clicks on them.
Sending key presses if often more reliable, because clicking requires the element to be in the visible area of the browser view.
DON'T:
1 2 3 |
|
DO:
1 2 3 |
|
P.S. On the contrary, Playwright lets you handle the clicks even in areas outside of visible viewport (it scrolls to the element automatically).
Tips and Tricks Testing Django 5.x Django 4.2 Django 3.2 Selenium
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.