Want to include notes or comments in your script about what you’re recording?
While recording, the Control Bar contains an Insert Script Comment button
- Click the Insert Script Comment button
- The Comment Window appears
- Enter a comment and click OK
Once you complete your recording, by clicking Stop, the comment appears within your script. The following example’s comment is: # Adding a new entry
def main(): startApplication("AddressBookSwing.jar") activateItem(waitForObjectItem(":Address Book_JMenuBar", "File")) activateItem(waitForObjectItem(":File_JMenu", "New...")) activateItem(waitForObjectItem(":Address Book - Unnamed_JMenuBar", "Edit")) activateItem(waitForObjectItem(":Edit_JMenu", "Add...")) # Adding a new entry type(waitForObject(":Address Book - Add.Forename:_JTextField"), "sam") type(waitForObject(":Address Book - Add.Forename:_JTextField"), "<Tab>") type(waitForObject(":Address Book - Add.Surname:_JTextField"), "smith") type(waitForObject(":Address Book - Add.Surname:_JTextField"), "<Tab>") type(waitForObject(":Address Book - Add.Email:_JTextField"), "sam@smith.com") type(waitForObject(":Address Book - Add.Email:_JTextField"), "<Tab>") type(waitForObject(":Address Book - Add.Phone:_JTextField"), "123.123.1234") clickButton(waitForObject(":Address Book - Add.OK_JButton"))