4. Dynamic Controls
Dynamic Control based automation is used only for Web automation and is most suitable in scenarios where the controls would change dynamically during execution.
In Jiffy, there are two approaches of dynamic execution:
- Parameter based - Update the UI control to make it dynamic using the values passed, for eg. List indexes, Xpath text etc.
- Dynamic scripting – The user would be allowed to execute customized scripting instead of the Jiffy captured properties.
Parameter Based
- Create an App and familiarize the control that need to be made dynamic
- Save the data
- Login to JiffyCore. Select the path “Repository -> UI Control” and select the control that was familiarized
- In UI Control, click on “Edit” button to edit the control properties
- Click on “Make Dynamic” button
- The below window will be displayed

- Enter Target Text as the text that need to be replaced
- Enter a variable name and click Save
- The target text will be replaced by the variable name in all the properties that were captured
- During Task design, when the UI Control is used, the user will have an option to provide value for the variable given.
- During execution, the variable value will be picked up and the execution will be based on the variable value.
For Example, user need to capture the data from a data grid in a website where the index or the record from which the data need to be captured would be passed dynamically.
Below video demonstrates parameter based dynamic control familiarization.
Dynamic Scripting
- Create an App and familiarize the control that need to be made dynamic
- Save the data
- Login to JiffyCore. Select the path “Repository -> UI Control” and select the control that was familiarized
- In UI Control, click on “Edit” button to edit the control properties
- Select the option “Use Dynamic Script”
- Add the dynamic script in the dynamic script area.

For example, if user need to find the fare of the preferred airlines using dynamic scripting use the following script
xpath1=‘//small[contains(text(),“‘+PreferredAirline+’”)]/../../../../..//li/../../../..//th[@id=“BaggageBundlingTemplate”]’
dr=self.engine.get_driver()
els=dr.find_elements_by_xpath(xpath1)
return els[0]