Activities
latest
false
Banner background image
UI Automation Activities
Last updated Apr 3, 2024

Web Automation

The example below explains how to automate the action of browsing a web page, retrieving the needed information, and displaying it into a message box. It presents activities such as Open Browser, Refresh Browser, and Go Home. You can find these activities in the UiPath.UIAutomation.Activities package.

This is how the automation process can be built:

  1. Open Studio and create a new Process.
  2. Drag a Sequence container in the Workflow Designer.
  3. Add an Open Browser activity inside the Sequence container.

    • Add the expression "https://www.xe.com/currencyconverter/convert/?Amount=1&From=EUR&To=RON" in the Url field.
  4. Select the Do container of the Open Browser activity and create the following variables:

    Variable Name

    Variable Type

    Default Value

    ExchangeRate

    GenericValue

     

    CustomerAnswer

    String

    "Yes"

  5. Add a Do While activity inside the Do container of the Open Browser activity.

    • Add the expression CustomerAnswer="Yes" in the Condition field.
  6. Add a Get Text activity inside the Sequence container of the Do While activity.

    • Inside the activity, click the Indicate element inside browser option. Now you can select the application. The GIF below shows all the steps you need to follow:


    • In the Properties panel, add the variable ExchangeRate in the Value field.
  7. Add a Message Box activity below the Get Text activity.

    • Add the expression String.Format("Current exchange rate: {0}. Refresh page?", ExchangeRate) in the Text field.
    • In the Properties panel, select the YesNo option from the Buttons drop-down list.
    • Add the expression "Exchange rate!" in the Caption field.
    • Add the variable CustomerAnswer in the ChosenButton field.
  8. Add an If activity below the Message Box activity.

    • Add the expression CustomerAnswer="Yes" in the Condition field.
  9. Add a Refresh Browser activity inside the Then container of the If activity.
  10. Add a Go Home activity below the If activity.



  11. Run the process for opening a browser, retrieving the needed information and displaying in into a message box.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.