Practice pages
Pages to write tests against. They do not change once published, so a test written today still works tomorrow.
Use them with Vision Automation Framework, plain Selenium or any other tool. Nothing you enter is stored or
sent anywhere, and these pages set no analytics cookies. Every element has a stable id; the
guide explains the control types.
Every page here is tested in VAF-Demo, an open test project in three levels, from native tests to shared steps and scenarios. Each page shows one of its tests at the bottom.
Forms
A sign-up form: text fields, a drop-down list, check boxes, radio buttons, a tooltip, a character counter and validation messages from the server.
AsTextInputField()
AsTextAreaField()
AsSelectBox()
AsCheckBox()
AsRadioButton()
AsButton()
AsLabelText()
AsToolTipText()
AsCounterField()
Tables
A list of 25 people with sorting, a filter and pages of 10, all done on the server, and a counter of the matching rows.
AsTableBody()
AsCounterField()
AsLabelText()
AsLink()
LetsGetCountOfElements()
Loading and waiting
Results behind a spinner, a message that appears later, a list that is drawn again, and a call made with jQuery that VAF waits for by itself.
LetsUseLoader()
WaitForLoad()
AsLabelText()
AsButton()
Alerts
The browser's own alert, confirm and prompt dialogs, and one alert that opens a moment after the click.
HaveAlert()
Accept()
Dismiss()
HaveText()
ContainText()
Windows and tabs
A link that opens a new tab and a button that opens a new window, both with their own title and address.
LetsSwitchToWindow()
LetsSwitchToWindowByURL()
LetsCheckIfWindowExists()
LetsCloseTab()
LetsOpenNewTab()
Date pickers (flatpickr)
flatpickr 4 calendars: one date, a pair of dates in different years, and a date with a time.
AsDateTimeFlatpickerV4()
LetsSelectDate()
HaveValue()
Date picker (Bootstrap 3)
The Bootstrap 3 datetimepicker 4, on a page of its own with Bootstrap 3, jQuery and moment.js, as older applications have it.
AsDateTimeBootstrap3DatepickerV4()
LetsSelectDate()
HaveValue()
File upload
One file, several files and a disabled file field; the server shows the names and sizes and keeps nothing.
AsUploadFileField()
LetsUpload()
BeDisabled()
Slider
A range from 0 to 100 that shows its value, moved by percentage or set to a value.
AsSlideBar()
LetsSetValue()
LetsMoveToPercentage()
Good and bad locators
The same order summary built for testing and built without it, and a redesign that shows which locators survive: ids and data-test do, generated classes, texts and positions do not.
By.Id()
data-test
By.CssSelector()
By.XPath()