The Action Center is a Repository Builder tool that allows developers to check whether the APIs of captured elements will perform the desired operation when used in the project code. In many cases, using a specific API in the automation code may not yield the expected result on the actual application, and a workaround needs to be found (e.g., a different API or another control). The Action Center enables users to test the APIs of a captured control before writing actual code, and even before adding a control to the Repository.
The Action Center supports invoking methods, querying properties and listening to events. The methods, events and properties of the application or control that is currently selected in the Repository Builder are listed in the respective tabs of the Action Center. Hovering the mouse over a method, event or property opens a tooltip providing a description.
Note: The lists in the Action Center may not include every method or property that is supported. Methods/properties that use complex object types are not available in the Action Center. |
Before accessing the Action Center, verify that the relevant application is open, and (if applicable) that the appropriate control is selected in the Repository pane. The Action Center can be opened in either of the following ways:
•Clicking the Repository Builder toolbar icon:
•Right-clicking the relevant application/control in the Repository pane, and selecting Action Center from the options menu:
•Clicking the toolbar icon of the Add Control dialog. (The Add Control dialog opens immediately after you have captured a control, using either the capture tool or the UI Explorer.)
To quit the Action Center and return to the Repository Builder, close the window or click the Close button at the bottom of the Action Center.
The Methods tab displays a list of all the available methods that can be executed on the selected control. Once a method is selected, any properties of the method are listed in the Method parameters frame. The Value field(s) can accept input, so you can test the method. For example:
When you click Invoke, the following actions take place:
•Validation that required properties are set.
•Validation that property types are correct.
•Execution of the method.
•Display of the string representation of the result in the return value box (in the lower portion of the Action Center). Any exceptions are also displayed in the return value box.
The Events tab displays a list of events relevant to the control, and allows you to select one or more events to listen for.
When an event is selected, the Start listening button is enabled. Clicking this button registers all selected events. While listening for events, the events list is disabled and the label of the Start listening button becomes Stop listening. Any triggered events are listed in the output box, in the lower portion of the Action Center. For example:
When the Stop listening button is clicked, all registered events are unregistered. The label of the button changes to Start listening, and the events list is enabled.
The Properties tab displays a list of properties relevant to the selected control, and allows you to test get and set operations on the property. For example:
When a property is selected from the list, the Set and/or Get buttons are enabled accordingly. If the property supports both operations, both buttons are enabled.
Clicking Get retrieves the property value from the object. The Property value textbox is cleared, and the string representation of the returned value is displayed in the textbox. For example:
To check the set operation, enter a value in the Property value textbox, and then click Set. The value in the textbox is set to the property.
Any exceptions are displayed in the output box, in the lower portion of the Action Center. The following example shows an exception that is thrown when trying to set text in a read only control: