Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Example of entering data into a web form from a worksheet

  • Updated: 11/17/2020
    • Automation 360 v.x
    • Build
    • RPA Workspace
    • Examples

Example of entering data into a web form from a worksheet

In this example, you build a bot to enter multiple rows of data from an XLSX sheet into a web form. Use actions from the Excel advanced, Loop, and Recorder packages.

To retrieve values from an Excel file and input them into a web form, do the following:

Procedure

  1. Open a new bot:
    1. On the left panel, click Automation.
    2. Click Create new > Bot.
    3. In the Create Task Bot window, enter a bot name.
    4. Accept the default folder location \Bots\.
      To change where your bot is stored, click Choose and follow the prompts.
    5. Click Create and edit.
  2. Open the Excel file.
    1. Double-click or drag the Excel advanced > Open action.
    2. Enter a session name.
    3. Select the Excel file.
    4. Mark the Sheet contains a header option.
    By marking the Sheet contains a header option, you enable the bot to search for the column by the header name during run time.
  3. Launch the website.
    1. Double-click or drag the Browser > Launch website action.
    2. Enter the website URL.
  4. Retrieve the worksheet values and store them in a Table variable.
    1. Double-click or drag the Excel advanced > Get multiple cells action.
    2. Enter the same session name you used in the Excel advanced > Open action.
    3. Select All rows from the drop-down list.
    4. Create a Table variable using the icon to the right of the Assign to variable drop-down list.
  5. Instruct the bot to process the data row by row.
    1. Double-click or drag the Loop action.
    2. Select the For each row in table iterator.
    3. Select the same Table variable that you used in Get multiple cells.
    4. Create a Record variable using the icon to the right of the Assign to variable drop-down list.
    The Record variable holds all of the values for one row. With each iteration of the Loop, the bot retrieves the values of the next row and stores them in the Record variable, overwriting the values from the previous row.
  6. Map the first column header to the web form textbox.
    1. Double-click or drag the Recorder > Capture action.
    2. Select the same window you opened with the Launch website action.
    3. Click Capture object.
    4. Hover over the textbox until a red outline appears.
    5. Click the textbox.
    6. Return to the Control Room.
    7. Verify that the Control Type value is TEXTBOX.
    8. Select Set text from the Action drop-down list.
    9. In the Keystrokes field, insert the same Record variable that you used in the Loop.
    10. Select the By name option and copy-paste the first column header into the field.
  7. Repeat the sub-steps in step 5 to map the other columns, with the following differences:
    1. Instead of searching for the browser window title, insert the Window variable generated by the Recorder.
    2. When inserting the Record variable in the Keystrokes field, copy-paste the subsequent column header into the "By name" field.
  8. Capture the Submit button.
    1. Double-click or drag the Recorder > Capture action.
    2. Insert the Window variable generated by the Recorder.
    3. Click Capture object.
    4. Verify that the Control Type value is BUTTON.
    5. Select the Click action.
  9. Click Save.
Send Feedback