Creating the extraction robot
Select the “Lotus Notes Sandbox Migration” project.
Create a new robot
Enter “NotesExtraction.robot” as the robot name and click [Next] to continue.
You can leave the URL blank for now. Click [Finish] to continue.
Below is a screenshot of the robot we want to create.
Load Page Step
I create the first step by right clicking on the “x” in the robot view window.
Click on [Insert Step Before] in the drop-down list.
The new step appears as “Unnamed”.
Click on [Select an Action] and then on the [Load Page] option in the Action tab in the Step view.
Enter the URL from which you want to start reading content from. In this example, I start from a Notes view.
Click on [Configure] beside “Options”. The Options dialog box opens in the workspace. I do not have a Username or Password entered because I set my Notes database to allow anonymous access. Click [Cancel] to close the Options dialog box.
Click on the “x” in the robot view window after you enter your URL.
The contents of the web page at the URL should load in the Windows view for you to see.
The HTML in the web page is displayed in the HTML view.
You can select HTML tags in either window and see the selection in both windows.
Add the SandBoxDoc Type
Add the type that we created earlier to the “Load Page” step. Click on the “Basic” tab and click on the “+” in the Variables tab at the bottom of the window.
The “Add Variable” dialog box opens in the workspace. Enter a name for the variable. I used “post” because that was what was used in the tutorials. Select the SandBoxDoc type in the “Type and Initial/Test Values” drop-down list. You will see the type properties displayed in the dialog box after selecting the SandBoxDoc type. Click [OK] to continue.
The “SandBoxDoc” type appears as a variable. The “post” properties are displayed when the post variable is selected.
Move to Starting Tag Snippet
Unfortunately, I had a lot of trouble getting to the right starting tag in the view. I believe that it has a lot to do with how Lotus Notes generates web pages. Basically, I had to drill down to the place in the web page that you see below: <tbody>. But there were several tbody’s along the way!
I created a series of steps to drill down to the correct starting tag. I grouped these tags together and then saved them as a snippet called “Move_to_Starting_Tag.snippet”.
I had to start near the <form> tag inside the <body> tag. The “1” below shows where I set the first tag.
The sixth tag is deep inside the first tag – inside a few tables. It is highlighted below with a “1”.
Maybe there is an easier way to drill down; but this way worked.
I created the table below to show how I got to the correct starting tag. Note how I name a tag in the “Name” field in the Action of step 1. Then I reference the tag name in the “In this Tag” field in the Tag Finders of step 2. This process repeats itself in each step. Only the first step refers to “Anywhere in Page” for the “Find Where” value for Tag Finders. All of the remaining steps refer to “In Current Tag”. That is how I drilled down through the HTML to get to the correct starting tag.
You will need to create these steps after the Load Page step.
I grouped the steps by first selecting them with the mouse in the robot editor view.
Then click the [Group] button in the action bar. Enter a name for the group and hit [Enter] on your keyboard.
You can now collapse and expand the group in the robot editor view by clicking on the [-+] button in the group.
Convert Group to Snippet
I selected the group and clicked on the [Convert group to snippet] action button in the action bar.
The New Snippet dialog box opens up in the workspace. Enter a name for the snippet and click [Finish] to continue.