Web Recorder - Examples
How to
use?
Example 1: Extract tabular data from internet web page.
- Open the Task Editor from Tools -> Task Editor.
- Double click on the 'Web Recorder' command. Select the 'Extract Table' option.
- Specify the url address like http://www.yourserver.com .
- Launch the URL.
- Click on 'Capture' button and click on the table that you want to extract.
- Specify the path of the csv file where you want the table data to be
stored when the task runs.
- Save the command.
- After you call the Extract Table command, Automation Anywhere stores all
the tabular data in a System variable called $Table Data(index)$.
You can use this variable to get all the rows and columns of the table that you imported.
- Double-click on Loop command.
- Select 'Each row in an Internet Explorer Table' option.
- To access the each row and column in the $Table Column$ System variable
provided by Automation Anywhere use Loop for Each row in an Internet
Explorer table option to loop through all the rows of the table. To access
each column use $Table Column(index)$ for e.g. to get the first column use
$Dataset Column(1)$ and so on.
- You can use Insert Keystrokes commands with $Table Column$ variable to type the results in the Excel document.
Example 2: Routinely click on a link that changes its location in Internet Explorer browser.
- Open the Task Editor from Tools -> Task Editor.
- Double click on the 'Web Recorder' command. Select the 'Open Browser' option.
- Specify the url address like http://www.yourserver.com. Save the command.
- Double click on Web Recorder command again and select 'Manage Controls' option.
- Specify the URL where you link is present, in this case it will be same as
the one you specified in Open Browser.
- Click on Launch. Click on Capture button and leave the mouse on the link
you want to click.
- The link information will be captured. Save the command
- Save the task.
- When you run this task, it will open the URL and click on the link you specified.
Example 3: Download an http file.
- Open the Task Editor from Tools -> Task Editor.
- Double click on the 'Web Recorder' command. Select the 'Download File' option.
- Specify the download file url address like http://www.yourserver.com/myfile.exe. Save the command.
- Specify the local file name to be stored on your machine.
- Save the command.
Example 4: Check all links in a web page.
- Open the Task Editor from Tools -> Task Editor.
- Double click on the 'Web Recorder' command. Select the 'Find Broken Links' option.
- Specify the url address like http://www.yourwebpage.com .
- Select the option 'Test Specified Webpage Only'.
- Specify the local file path for the csv file to store the results of the command.
- Save the command.
- When you run this command, it will test all the link
in the web page that you have specified and the results will be stored in the
CSV file that you have specified.
Example 5: Check all links in a website.
- Open the Task Editor from Tools -> Task Editor.
- Double click on the 'Web Recorder' command. Select the 'Find Broken Links' option.
- Specify the website address like http://www.yourwebsite.com .
- Select the option 'Test Entire Website'.
- Specify the local file path for the csv file to store the results of the command.
- Save the command.
- When you run this command, it will test all the link in the web page that
you have specified and the results will be stored in the CSV file that you
have specified.
Example 6: Always click the third link in the CNN Headlines.
- Click on Tools->Web Recorder.
- Type in http://www.cnn.com and click on Start
- Click on the third link and Stop recording.
- Open the task in Editor.
- Edit the Click command.
- Uncheck the 'Name' box and check the 'Index' box.
What this does is, every time it comes across this command it will search this
link by its index and not the name or URL it points to. So next time even if
the name of the link changes, it clicks on the same 3rd link.
Example 7: To extract data
from a website and paste it into a blank word document
- Open Task Editor from ‘Tools-> Task Editor.
- Expand ‘Web Recorder’ command.
- Double Click on ‘Extract Data’ command.
- Enter
the website URL and click ‘Launch’ e.g. http://www.tethyssolutions.com/automation-software.htm
- Once the site is opened, you will be re-directed to
the extract data command dialog box.
- Click ‘Capture’.
- You mouse will appear as a yellow background text
indicating ‘Please click on the data you want to extract.’
- Move your mouse over the text which you want to copy and
click anywhere within the text. (If the text background of the mouse changes
to red, it means the text is not available for copy.)
- Assign the copied text value to a variable from the list
let’s say $my-variable$
- Click ‘Save’ button.
- Make sure a blank word document is open.
- Double click on ‘Insert Keystrokes’.
- Select the window title from the list.
- Insert the variable from the list on the right hand side
of the dialog box i.e.$my-variable$
- Click
‘Save’ button.
Tip: You can specify keywords
which shall determine the range of your text. E.g. from the text ‘Your reference
no. is 245698 for today’, if you want to copy just the number and avoid the
extra text, specify ‘is’ as the ‘Before Keyword’ and ‘for’ as the ‘After
Keyword’.
Note: In Manage Controls command there is an Advanced
option for Links. It has three check boxes i.e. Name, URL, Index. Following is
an explanation of each of the check boxes.
- Name: While running the task, it will search for
the link by the name that was recorded. For e.g. while recording on
www.tethyssolutions.com you clicked
on a link named 'Automation Anywhere' then while playing if this box is
checked (default behavior) it will search for a link called 'Automation
Anywhere' on www.tethyssolutions.com. If it does not find a link
by this name then it gives an error.
- URL: Similar to the Name checkbox but instead of
searching the link by its name, it searches the link by the URL that is points
to. For e.g. if you recorded a click on a link called 'Automation Anywhere
3.0' that points to http://www.tethyssolutions.com/automation-software.htm,
and tomorrow if the link name changes to 'Automation Anywhere 4.0' but still
points to the same URL then you can check this box.
- Index: This option will search the link by
its location index. Every link in a web page has a location index. For e.g. if
you clicked on a link whose index number was 2 and you always want to click on
that link when the task runs no matter what the name or URL of that link is.
In that case you can keep only this option
checked.