Date Pickers

Dealing with date picker widgets in automated testing can be tricky due to their complex interfaces and the need for the selected dates to remain relevant over time. For instance, selecting tomorrow’s date for a selected date works fine now but will cause issues if the same test runs two days later. CheckView does not autocomplete date pickers currently, but custom steps can be added to manage them. With this in mind, CheckView can’t inherently understand the context of the chosen date when setup in a step, which results in selectors tied to specific dates that quickly become outdated.

To maintain the functionality of your tests, you’ll need to modify these selectors. Choosing the next available date is sufficient for testing purposes. Most date picker widgets have CSS classes that help make this possible. For example, using a selector like 'day.available' often allows you to consistently target the next available date instead of a hardcoded date that will become outdated by the next test run.