Last Updated: Apr 30, 2021
All the controls that are recorded using Jiffy UI Learn get listed in UI controls tab. You can also manually add UI controls and edit the existing UI controls for any changes in the recorded control of the UI pages.
UI Controls tab displays ID, Name, Created by, Updated On, Type, Mode, Module, and Action of each UI Control.
Specify the following details in the Add UI Control window.
Click the Save button.
Click the icon against the UI Component you wish to modify:
Dynamic Control based automation is used in scenarios where the control changes dynamically during execution. UI Controls can be of Static or Dynamic type.
By default, mode of any UIControl is Static. You can change it to Dynamic from the Edit UIControl window. The two approaches for dynamic execution are:
When you want the UIControl to be dynamic based on the value that is passed to it from the Actions tab during execution, use parameters passed recording. Depending on the context of the business scenario, XPath of the UI control changes based on the parameter value. You can enter the values for the variable in the Actions tab as input parameters to the UI event.
In Flight Booking, mode of UI element One-way is changed to Dynamic with Variable Name as TripType. In Actions tab, based on the value passed to the variable, One-way, Two-way, or Round trip, from the travel booking request, the selection of the control differs. During execution, the control selection differs based on the variable value passed.
The UIControl is now dynamic. The target text gets replaced by the variable name in all the properties that were captured.
During Task design, in Actions tab, you can provide value for the variable.
During execution, the variable value is picked and executed based on the variable value passed.
If you wish to completely overwrite the recorded values, use customized code to interact with the target application and find the required UI Element.
Use dynamic scripting to find fare of the preferred airlines.
- Use driver = self.engine.get_driver() code to get the web driver object.
- Use driver.find_elements_by_xpath(x) code to find an element with xpath for solutionPrice.
x =‘//div//img[@alt=‘+’“‘+Flight+’”‘+’]/../../../../..//div[@data-ct-handle=“solutionPrice”]/p’ driver=self.engine.get_driver() elementm=driver.find_elements_by_xpath(x) print(elm) print(x) return elementm[int(index)]