Power Automate Desktop | Browsing websites exercise | Run a search in Google and retrieve the results

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Software ==> Power Automate Desktop  (18 exercises)
Version ==> Latest version
Topic ==> Browsing websites  (1 exercise)
Level ==> Relatively easy
Subject ==> Power Automate training

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

The aim of this exercise is to run a search for a specific string of text in Google.  Start by creating a flow called Run a Google search, then use an input box to find what you're going to search for:

Input dialog box

Capture your search text in a variable.

Add an action to start your favourite browser, going to the Google home page within it:

Google search page

The familiar Google search box.

 

Add UI elements for the search box and the search button:

UI elements added

Initially you'll see something like this.

 

Give these elements better (more meaningful) names:

Renamed UI elements

You can include spaces in UI element names.

 

Add commands to go to the search box and type in your search string:

Typing into search box

If you leave the Emulate typing option chosen for the second action you can watch Power Automate Desktop typing in text!

 

You now realise that the easiest way to proceed is to just press Enter (or at least, use a Send keys action to mimic this).  Add this action, then delete any UI elements you're not using:

Removing unused UI elements

The quickest way to remove UI elements that you're not using.

 

Run your flow to check that it works!

The final flow

You may get an astonishingly high number of results, depending on your search string.

 

Edit your search text box UI element to see if you can make its definition a bit more forgiving:

Editing the UI element

Edit the search text box.

Choose to look at the selector path:

Selector builder

Click on the three dots to show the Selector builder dialog box for this UI element.

See if you can whittle the selector path down a bit.  From this:

Original selector path

The original path will look something like this.

To more like this:

Final selector path

The final, (too?) simple selector path.

 

Test to see if your revised flow still works (it should).

A final thought: have you made your flow more or less robust?

Save this flow and close it down.

 

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only. Our Power Automate exercises answers are provided as text files - you can see how to assemble these back into PAD flows here.
This page has 0 threads Add post