Skip to main content

Forms

Consider a form from a practice site like Demo QA. The form has multiple fields like

  1. Text field
  2. Radio Buttons
  3. Check Box
  4. Date Picker
  5. File Upload
  6. Text Area
  7. Pickers
  8. Buttons

DevAssure provides the capability to automate all the fields in a form.

Test Data Management

Additionally, you can also use the same test automation script to validate for multiple data inputs by using the Test Data manager available in-built within DevAssure. The tests will be executed in parallel for different test data set. This greatly reduces the need to add multiple tests for different types of data for similar use cases.

Test Data for Forms

Accessing the test data within the automation

Accesing Test data in automation

Creating dynamic locators

DevAssure also provides the ability to create dynamic locators. This is specifically useful when selecting values in dropdowns, pickers, checkbox and radio buttons.

Creating a dynamic locator

Creating a dynamic locator

Accessing a dynamic locator

Accessing a dynamic locator

Creating re-usable functions to select values in pickers or checkbox in a dynamic way

When there are mutliple values to be selected in pickers and checkboxes, these values should be passed from the test data set. Its not scalable to add a column or a separate field for each data. Using DevAssure's Advanced Code Block capabilities this can be easily solved.

Consider the following component that includes searching for a subject and adding multiple subjects.

Picker Component

Advanced Code Block

Advanced Code Block

The input data in the above code is a comma separated list.

The advanced code block can also be used to transform a date string like "18 July, 2022" into values that can be provided to the date picker.

Advanced code block for selecting date

Complete Test Automation Code for a Form

Complete Test Automation Code for a Form