activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Oct 28, 2024

Browser Navigation

The example below explains how to open a web page and navigate back and forward through pages. It presents activities such as Navigate To, Go Forward, and Go Back. 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.name-generator.org.uk/quick/" in the Url field.
    • Open Internet Explorer and navigate to https://www.name-generator.org.uk/quick/.
  4. Select the Do container of the Open Browser activity and create the following variables:

    Variable Name

    Variable Type

    Default Value

    RandomName

    GenericValue

     

    nameHash

    GenericValue

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

    • Inside the activity, click Indicate element inside browser, and then select a name from the web page. The GIF below shows all the steps you need to follow:



  6. Add a Get Text activity below the Highlight activity.

    • Inside the activity, click Indicate element inside browser, and then select the same name as in the previous step. The GIF below shows all the steps you need to follow:


    • In the Properties panel, add the variable randomName in the Value field.
  7. Add a Navigate To activity below the Get Text activity.

    • Add the expression "http://www.miraclesalad.com/webtools/md5.php" in the Url field.
    • In Internet Explorer, navigate to http://www.miraclesalad.com/webtools/md5.php.
  8. Add a Type Into activity below the Navigate To activity.

    • Add the variable randomName in the Text field.
    • Inside the activity, click Indicate element inside browser, and then select the String text box. The GIF below shows all the steps you need to follow:



  9. Add a Highlight activity inside the Do container of the Open Browser activity.

    • Inside the activity, click Indicate element inside browser, and then select the displayed MD5 hash. The GIF below shows all the steps you need to follow:



  10. Add a Get Text activity below the Highlight activity.

    • Inside the activity, click Indicate element inside browser, and then select the displayed MD5 hash. The GIF below shows all the steps you need to follow:


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

    • Add the following expression in the Text field: "MD5 Hash for '" + randomName + "' is '" + nameHash + "'".
  12. Add a Highlight activity below the Message Box activity.

    • Inside the activity, click Indicate element inside browser, and then select the browser Back button. The GIF below shows all the steps you need to follow:



  13. Add a Go Back activity below the Highlight activity.

    • In Internet Explorer, go back to https://www.name-generator.org.uk/quick/.
  14. Add a Highlight activity below the Message Box activity.

    • Inside the activity, click Indicate element inside browser, and then select another name. You can follow the instructions explained in the GIF at step 5.
  15. Add a Get Text activity below the Highlight activity.

    • Inside the activity, click Indicate element inside browser, and then select the same name as in the previous step. The GIF below shows all the steps you need to follow:


    • In the Properties panel, add the variable randomName in the Value field.
  16. Add a Go Forward activity below the Highlight activity.

    • In Internet Explorer, go forward to http://www.miraclesalad.com/webtools/md5.php.
  17. Add a Type Into activity below the Go Forward activity.

    • Add the variable randomName in the Text box.
    • Inside the activity, click Indicate element inside browser, and then select the String text box. You can follow the instructions explained in the GIF at step 8.
  18. Add a Highlight activity below the Type Into activity.

    • Repeat the instructions from step 9.
  19. Add a Get Text activity below the Highlight activity.

    • Repeat the instructions from step 10.
  20. Add a Message Box activity below the Get Text activity.

    • Repeat the instructions from step 11.
  21. Add a Close Window activity below the Message Box activity.
  22. Run the process for opening a browser, navigating back and forward between pages, and displaying information from the pages.

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.