Parameterise your Test Object Properties
Last updated
Last updated
In SimplifyQA, you can parameterise object properties by dynamically passing values into object locators and attributes. This is especially useful when dealing with dynamic elements whose values change during test execution, such as:
User-specific elements (e.g., profile names, order IDs)
Dynamically generated UI components (e.g., buttons, dropdowns)
Reusable test objects across multiple test cases
By calling parameters in locators instead of hardcoding values, you can make your automation more robust and scalable.
Open the Object details: Navigate to Test Management > Object Repository or
Navigate to a test case and select the object you want to parameterise.
Locate and open the details of the object you want to parameterise.
On the right panel, you will see all the available locators/XPaths.
When working with dynamic XPaths, instead of manually entering variable values, you can use a parameter by replacing the dynamic part with {{parameter_name}}.
Example – Dynamic XPath for a User Profile Button:
Static XPath with hardcoded User ID would be:
Issue: If the User ID changes, this locator would fail.
Parameterised XPath would be:
Solution: Instead of hardcoding 12345, we use {{UserID}}, which dynamically picks up the value at runtime.
In the object locator field, place your cursor where the dynamic value should go.
Type "{{" (double curly braces).
A dropdown menu will appear showing all available parameters.
Select the appropriate parameter name.
Scalability: Reuse the same locator across different test cases.
Flexibility: Handle dynamic elements without modifying test scripts.
Efficiency: Reduce maintenance efforts when UI changes.
Data-Driven Testing: Easily integrate with different datasets.