Step-by-Step Guide to Use Java Application to Select Gender Radio ButtonLet's see an example of selecting the gender that is a radio button available on the Java application. Below is the sample Java application window with window title as Demo App:
Prerequisite: 1. In the Admin menu, add an application of Application Type - JavaApps. 2. Browse and select the required .jar file. 3. In the Environment Type list, select the WINDOW_CLASS_BASED option.
4. Click
the The Java application is configured.
To select the required radio button option: 1. From the Canvas Tools panel, add Application activity to the Flowchart designer on the Canvas. 2. In the Application Type list, select Java Apps. 3. In the Select an Application list, select the MenuDemo option configured above.
4. In the Menu bar of the Studio menu, click Test Run drop down, and then click Setup Environment to setup and launch the configured application using the Automation Studio. 5. Double click the Application activity and add the Application Host activity inside the Application activity. 6. In the Application Host activity, select Windows from the drop down list.
7. Click
the
8. In the Attach Behavior list of the Basics category, select Contains. 9. In the Window Title field, enter the title of the Java application window. In this example the title entered is Demo. Other default settings remain same. Close the dialog box to save the plug in configurations. 10. Double click to open the Application Host activity block.
11. Click ADD to add the Application Control activity. 12. Click
the 13. Press the Ctrl key from the keyboard and hover over the Female radio button that needs to be selected.
14. While pressing the Ctrl button click the highlighted area. A dialog box appears where you can configure the details related to the captured UI element. The fields that are mandatory are highlighted with red box. 15. In the Action list, select the Select Radio Button option. 16. In the Display Name field, enter a name of your choice. In this example SelectGender is entered. 17. Select the Is Default Value check box, and then enter the radio button text that must be selected. In this example Female is entered.
18. Close the dialog box. The Save Confirmation message box appears. Click YES to save the entered details. Below is the sample process:
To view the output in Automation Studio, reset and then set up the environment. Perform the test run. You can assign this process to a robot, if you want to execute this process outside Automation Studio. Observe that the Java application gets automatically launched and the Female radio button is selected, as shown below:
|
Related Topics |