Creating a Migration Robot in Kapow Design Studio – Part 3 of 5


Creating the extraction robot

Select the “Lotus Notes Sandbox Migration” project.

clip_image001

Create a new robot

clip_image002

Enter “NotesExtraction.robot” as the robot name and click [Next] to continue.

clip_image003

You can leave the URL blank for now. Click [Finish] to continue.

clip_image004

Below is a screenshot of the robot we want to create.

clip_image006

Load Page Step

I create the first step by right clicking on the “x” in the robot view window.

clip_image007

Click on [Insert Step Before] in the drop-down list.

clip_image008

The new step appears as “Unnamed”.

clip_image009

Click on [Select an Action] and then on the [Load Page] option in the Action tab in the Step view.

clip_image010

Enter the URL from which you want to start reading content from. In this example, I start from a Notes view.

http://litwaredemo:8080/acme_apps/NotesWeb/sandbox.nsf/ByApplicationName?OpenView

clip_image011

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.

clip_image012

Click on the “x” in the robot view window after you enter your URL.

clip_image007[1]

The contents of the web page at the URL should load in the Windows view for you to see.

clip_image014

The HTML in the web page is displayed in the HTML view.

clip_image016

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.

clip_image017

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.

clip_image018

The “SandBoxDoc” type appears as a variable. The “post” properties are displayed when the post variable is selected.

clip_image019

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!

clip_image021

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”.

clip_image023

I had to start near the <form> tag inside the <body> tag. The “1” below shows where I set the first tag.

clip_image024

The sixth tag is deep inside the first tag – inside a few tables. It is highlighted below with a “1”.

clip_image025

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.

Step

Tag Finders

Action

1

clip_image027

clip_image029

2

clip_image031

clip_image033

3

clip_image035

clip_image037

4

clip_image039

clip_image041

5

clip_image043

clip_image045

6

clip_image047

clip_image049

You will need to create these steps after the Load Page step.

Grouping Steps

I grouped the steps by first selecting them with the mouse in the robot editor view.

clip_image051

Then click the [Group] button in the action bar. Enter a name for the group and hit [Enter] on your keyboard.

clip_image052

You can now collapse and expand the group in the robot editor view by clicking on the [-+] button in the group.

clip_image053

Convert Group to Snippet

I selected the group and clicked on the [Convert group to snippet] action button in the action bar.

clip_image054

The New Snippet dialog box opens up in the workspace. Enter a name for the snippet and click [Finish] to continue.

clip_image055

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s