SlideShare a Scribd company logo
© Copyright International Business Machines Corporation 2020
Build your first RPA bot using WDG
Automation
Hands-on Lab
Version 1.2
Authors:
Jukka Juselius - jukka.juselius@fi.ibm.com
Paul Pacholski – pacholsk@ca,ibm.com
© Copyright International Business Machines Corporation 2020 2
Table of Contents
1. Introduction ....................................................................................................................................3
Use case ..............................................................................................................................................3
Prerequisites .......................................................................................................................................3
2. Work with Completed Automation ..................................................................................................4
Open completed lab ............................................................................................................................4
Change impute csv file location ...........................................................................................................4
Run the automation.............................................................................................................................5
3. Lab Instructions ...............................................................................................................................6
Start WDG Automation Studio.............................................................................................................6
Create a new automation ....................................................................................................................7
Create your bot script - Login to JK Automation website......................................................................8
Test your automation and continue implementation.........................................................................15
Download CSV...................................................................................................................................16
Read CSV...........................................................................................................................................16
Store row data in variables ................................................................................................................18
Set Sales Leads input fields ................................................................................................................20
Define Subroutines............................................................................................................................23
Add loop to iterate through the data table ........................................................................................25
Logout from JK automation website ..................................................................................................29
© Copyright International Business Machines Corporation 2020 3
1. Introduction
This hands-on lab you will learn how to use WDG Automation Studio to create a simple RPA
automation.
FIGURE 1. WBG AUTOMATION
Use case
In this exercise you will build a robot to automate processing of sales leads that arrive in a
CSV/Excel format. Each row of the file represents a separate sales lead. The sales leads need to
be manually entered (copy/paste) by an analyst into the online opportunity system of record (JK
Automation Sales Leads). This task is error prone and the analysts repeatedly ask if this can be
automated, but it has never been a company priority. Until now
Prerequisites
• Personal WDG Automation Account activated
• WDG Studio installed and configured to your computer
© Copyright International Business Machines Corporation 2020 4
2. Work with Completed Automation
If you just want to run the automation without authoring it or if you just want to look at a completed
solution, follow these instructions below.
Make sure you have the two files required to run the automation in this lab:
Open completed lab
In WDG Studio, Select Open
Navigate to sales-lead-automation-completed.wal and click Open.
Change impute csv file location
Double click on the Read CSV File command
Click File selection helper icon to change the location of the SalesLeads.csv file and
then click Save
© Copyright International Business Machines Corporation 2020 5
Run the automation
_1. Click the green Run icon form the top toolbar. Alternatively you can hit F5.
© Copyright International Business Machines Corporation 2020 6
3. Lab Instructions
Start WDG Automation Studio
_1. Double-click the WDG Studio shortcut in your desktop.
_2. When the login window opens (might take a while for the first time), type in your username
and hit the Login button.
_3. When your tenant name is displayed, type in your password and hit the Login button again.
© Copyright International Business Machines Corporation 2020 7
Create a new automation
Create a new WAL file by clicking the New icon from the top toolbar or New under "Get
Started" section.
Select WAL file and click Open.
© Copyright International Business Machines Corporation 2020 8
Create your bot script - Login to JK Automation website
You should now have your Studio opened with an empty WAL file in your Designer view.
Note that you can change your view between Script, Designer and Call Graph.
Add Start Browser command from your Toolbox to your Designer view. You can find the
command under Browser > Actions. Drag and drop it to your canvas.
© Copyright International Business Machines Corporation 2020 9
The command configuration opens. You need to set name to your browser instance (for
example web01). Keep Google Chrome selected as your browser type, if you have Chrome
installed. You can also change the browser to one you want to use. Click Save button.
Close Browser configuration window pops up automatically. Make sure to set the same
instance name value that you used for Start Browser. Also set Keep browser open as
enabled. This helps you during the implementation so that browser is not closed when you test
your automation and you can continue using it for defining next actions for your automation.
Click Save button to close the configuration window.
© Copyright International Business Machines Corporation 2020 10
Next command we want is Navigate. You can find it also under Browser > Actions. Drag
and drop it below the Start Browser command to your Designer view. Set the URL to
http://jk-automation.mybluemix.net and click the Save button.
Save your work by hitting Ctrl+S or the Save icon from the top toolbar. Name your
automation WAL file to jk-automation. Your automation should now look as follows.
Run your automation to test that it works and JK Automation website is opened. Click the
green Run icon form the top toolbar. Alternatively you can hit F5.
© Copyright International Business Machines Corporation 2020 11
You should see new Chrome Browser window opened and JK Automation login page
opened. Note! For the first time this might take a couple of seconds. When you go back to your
Studio window, you should see Execution succeeded text at the bottom left-hand side corner.
Make sure to leave the browser window open!
Nice! Your first run with WDG Automation Let's keep on going! Next we will need to
automate the login to JK Automation website.
Currently WDG does not offer any mechanism to automate the capturing of objects (like web
form fields) that you want to use in your automation. For web pages this needs to be done
manually using browser functionality to inspect the object and copy the selector for it. WDG
supports several selectors for fields: id, name, css, xpath, id + name.
Open JK Automation browser window that you should have open. Right-click the
Username field and from the opened menu select Inspect.
© Copyright International Business Machines Corporation 2020 12
This open your browsers element inspector with the Username field element selected.
Right-click the selected element, select Copy > Copy selector. This will copy the CSS Selector
for the element to your clipboard.
© Copyright International Business Machines Corporation 2020 13
Go back to your WDG Studio and add Set Value to Field (Browser > Fields > Set
Value to Filed) command to your automation just under Navigation command.
When the command configuration window opens set Value to "whatever" (username you
use does not matter), Selector Type to Css and Css to the value from your clipboard (the
selector you copied from element inspector). Finally click Save.
Similarly add new Set Value to Field command below the previous for the Password
field. Set Value to password10.
Now, let's finish the login sequence by adding a command to click the Submit button in the JK
Automation login page.
© Copyright International Business Machines Corporation 2020 14
We'll do that by adding command Click on Web Page after the Set Value to Field
commands. Note that you can use toolbox search field to find commands. To display all the
commands related to clicking, type click to the search field.
Get the selector for the Submit button from your browsers element inspector as you earlier
did for the Username and Password fields.
© Copyright International Business Machines Corporation 2020 15
Your automation should look like as follows. Nice, good job!
Test your automation and continue implementation
Save your work.
Close your browser with JK Automation login page
Run your automation to test that it works and JK Automation website is opened. Click the
green Run icon form the top toolbar. Alternatively you can hit F5.
You should see your bot executing, opening the JK Automation web page and logging in with
the information that you used to develop the login sequence. When your bot is finished, you
should see the JK Automation welcome page.
© Copyright International Business Machines Corporation 2020 16
Download CSV
Click the Download file link in the left-hand side menu to download the CSV file that we
will use to read some new sales leads from and add them to JK Automation system. Save the file
to your computer and take note of the folder you saved it to. You will need that later on.
When you have downloaded the CSV file, click the Leads link to open the JK Automation
Sales Leads view in your browser.
We will use this CSV file as input to our automation.
Read CSV
Since we want to handle Leads, add a Click on Web Page command to your automation to
click the Leads link in the left-hand side menu. Yet again, use your browsers element inspector
to get the needed selector for the Leads link.
© Copyright International Business Machines Corporation 2020 17
Use toolbox search to find Read CSV File command and add it after your last Click on Web
Page command.
When the command configuration window opens, use the folder browse icon to select the file
you just downloaded from your file system, leave all the other selections as they are in default.
There are three outputs for the command: Data Table (holds the data), Rows (number of rows in
the data table) and Columns (number of columns in the data table). We want to store these to
variables.
First, Click the folder icon besides the Data Table field to open variable list (as shown in
picture above). Next, click Add new variable icon and the Define Variable window opens.
© Copyright International Business Machines Corporation 2020 18
Name the variable as leads. Notice that the variable type is automatically set to match the
output type (Data Table). Click Save.
Repeat the previous steps to create variables also for other outputs Rows and Columns. Name
them row_count and column_count, respectively. Your Read CSV File command
configuration should now look as follows. Click Save.
Store row data in variables
Now, we obviously want to iterate through all the rows within the data table and insert the data
to JK Automation Sales Leads page. Let's focus first on getting a lead read from the data table.
Use your toolbox search to find Map Table Row command and then drag and drop it under
the Read CSV File command in your Designer view.
© Copyright International Business Machines Corporation 2020 19
When the configuration window opens, select variable leads to Data Table and then create a
new variable for Row called row_iterator (since we want a variable to iterate through the data
table) and set the default value for it to 1.
Next we need to create mappings for the data table row. If you open the CVS file that we're
using for the lab with Excel / Notepad, you can see that there's 12 data rows and also 12 different
columns: First Name, Last Name, Job Tile, Company, email, phone, Client Address, Client
City, Client State, Client Zipcode, Area of Interest and Followup Requested.
© Copyright International Business Machines Corporation 2020 20
Click plus sign (+) within your Map Table Row configuration window to add all the
needed mappings for your row. Use the Column Name to identify the data for the mapping and
create a new variable to hold the data. Map and name the variables as follows.
Click Save to save and close the configuration. Now we need to insert the data to JK
Automation Sales Leads page that you should still have open in your browser.
If you have closed JK Automation web page, you can always run your current automation to get
the JK Automation Sales Leads page opened and continue from there.
Set Sales Leads input fields
You will use a series of Set Value to Field commands to insert data that we just extracted to
JK Automation Sales Leads page and to it's matching fields. Let's go through the first mapping
together.
© Copyright International Business Machines Corporation 2020 21
Right-click the First Name input field in the web page, select Inspect > Copy > Copy
Selector
Add Set Value to Field command to your automation under Map Table Row command
For Selector Type select Css, for Css copy the CSS Selector from (as shown in Step 1), for
Value use the extracted variable first_name. Enable Simulate Human option. Click Save.
Similarly, set all the remaining 11 input fields.
Note, you can use copy-paste in your Designer view to easily copy commands.
© Copyright International Business Machines Corporation 2020 22
Add If command (Under Base > Flow Control) to your automatio under the last Set Value
to Field command. Configure it using the followup variable as follows.
Add Click on Web Page command between If and End If.
For Selector Type select Css, for Css copy the CSS Selector for the Follow up check box
in the Sales Leads web page. Enable Simulate Human option. Click Save
Add Click on Web Page command under End If to click the Submit button in the Sales
Leads web page
© Copyright International Business Machines Corporation 2020 23
For Selector Type select Css, for Css copy the CSS Selector for the Submit button web.
Enable Simulate Human option. Click Save
Save your work, close your browser showing the JK Automation web site and run your
automation by hitting the Run icon in the top toolbar. You should see your automation executing
and entering the first sales lead (Dave Wakeman) to the JK Automation Sales Leads page. Nice!
Define Subroutines
WDG Studio allows you to define and group parts of your automation as sub-routines. This can
be useful to group logic parts of your automation script and make your automation more easily
understandable.
© Copyright International Business Machines Corporation 2020 24
In your WGD Studio Designer view, select (Shift+Click) all commands between Map Table
Row and Close Browser (NOTE! Do NOT select Map Table Row and Close Browser!), right-
click one of the selected commands and select Advanced > Extract Routine.
Name your sub-routine as InsertLeadData. Click Save.
© Copyright International Business Machines Corporation 2020 25
Studio will show the extracted sub-routine. You can close it and return to "main" automation
by clicking the close icon after the name of the sub-routine.
You can now see the extracted sub-routine in your "main" automation script.
Note, variables in WDG Studio are global. This means that you do not need to map variables
between your main automation script and its sub-routines.
Add loop to iterate through the data table
We have our automation almost ready. One of thing we still need to do, is to add a looping
structure to iterate through all the sales leads within the data table that we read from the CSV
file. WDG automation studio offers several structures to do this. We will use a While loop and
use the row_count variable to go through all the records.
© Copyright International Business Machines Corporation 2020 26
Select the Map Table Row and the Run Subroutine commands, right-click one of the
selected commands, and select Advanced > Surround With > While.
Configure the While command using the row_count and row_iterator variables as follows.
Click Save.
© Copyright International Business Machines Corporation 2020 27
You will now see the While loop in your main automation script.
Good job! But something is missing... Right! We need still need to make sure that we increase
our row_iterator value for each iteration.
Right-click the Run Subroutine inside the While loop and select Go To Definition.
© Copyright International Business Machines Corporation 2020 28
Add Calculate Mathematical Expression command (Base > Numeric) as the last
command of the sub-routine. Configure it as follows. We want to add +1 at the end of each
iteration.
You should now have the command added to your sub-routine.
© Copyright International Business Machines Corporation 2020 29
Close the sub-routine to go back to main automation script. Save your work.
_1. Close your current browser window showing the JK Automation web site and Run your
automation to test that it works and JK Automation website is opened. Click the green Run icon
form the top toolbar. Alternatively you can hit F5.
You should see the automation / bot executing and adding all the sales leads to the JK
Automation web site. When the bot finished running you should now see all the rows from the
excel spreadsheet in the Sales Leads table.
Logout from JK automation website
Recall that the Close Browser command was configured to left browser open for testing.
© Copyright International Business Machines Corporation 2020 30
To complete our automation. let’s implement logout from the JK Automation site by adding two
Click on Web Page commands at the end of your automation, just before the Close Browser
command.
First one to click your username on the right-hand side upper corner of the web page
Select the logout link from the menu, right click and then select Inspect
© Copyright International Business Machines Corporation 2020 31
Select Copy > Copy Xpath
use your browser to inspect the elements you want to interact with and copy the selector for
them. This time try using XPath selectors.
Add Click on Web Page after End While command
Set Search for to XPath and Xpath to the value from your clipboard (the xpath you
copied from element inspector). Finally click Save
© Copyright International Business Machines Corporation 2020 32
The last three commands in the Designer should now look similar to this
Double click Close Browser command and s at the end of your automation before the
Close Browser command, change the Keep browser open off and click Save
Test your automation again. You should now see the browse close after the automation
completes.
Well done! Congrats finishing the exercise! Hope you learned some of the basics on how to
use WDG Automation Studio. Keep on automating
THIS COMPLETES THIS HANDS-ON LAB

More Related Content

What's hot

MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008
Peter Horsbøll Møller
 
SAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoftSAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoft
MuleSoft
 
0106 debugging
0106 debugging0106 debugging
0106 debuggingvkyecc1
 
Maximo training - Getting Started
Maximo training - Getting StartedMaximo training - Getting Started
Maximo training - Getting Started
Bruno Portaluri
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
Revanth Nagaraju
 
Practicas de visual basic 6.0
Practicas de visual basic 6.0Practicas de visual basic 6.0
Practicas de visual basic 6.0BangMiriam3003
 
Beginner’s guide to sap abap 1
Beginner’s guide to sap abap 1Beginner’s guide to sap abap 1
Beginner’s guide to sap abap 1
Panduka Bandara
 
Planning learn step by step
Planning learn step by stepPlanning learn step by step
Planning learn step by step
ksrajakumar
 
08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview
sapdocs. info
 
ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
sapdocs. info
 
Sap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginnersSap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginners
Hossam Abdo
 
SAP ABAP Interview questions
SAP ABAP Interview questionsSAP ABAP Interview questions
SAP ABAP Interview questions
IT LearnMore
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c language
AMIT KUMAR
 
Sapscript
SapscriptSapscript
Sapscript
Jen Ringel
 
Maximo Training - Introduction
Maximo Training - IntroductionMaximo Training - Introduction
Maximo Training - Introduction
Bruno Portaluri
 
Sap abap tutorial
Sap abap tutorialSap abap tutorial
Sap abap tutorial
Emerson Leite
 
Abap performance tunning tips
Abap performance tunning tipsAbap performance tunning tips
Abap performance tunning tips
Jay Dalwadi
 
IBM Roadmap Maximo 2018
IBM Roadmap Maximo 2018IBM Roadmap Maximo 2018
IBM Roadmap Maximo 2018
FMMUG
 
Maximo 7.6.0.8
Maximo 7.6.0.8Maximo 7.6.0.8
Maximo 7.6.0.8
Helen Fisher
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
Hitesh Gulani
 

What's hot (20)

MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008
 
SAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoftSAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoft
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
 
Maximo training - Getting Started
Maximo training - Getting StartedMaximo training - Getting Started
Maximo training - Getting Started
 
SAP ABAP data dictionary
SAP ABAP data dictionarySAP ABAP data dictionary
SAP ABAP data dictionary
 
Practicas de visual basic 6.0
Practicas de visual basic 6.0Practicas de visual basic 6.0
Practicas de visual basic 6.0
 
Beginner’s guide to sap abap 1
Beginner’s guide to sap abap 1Beginner’s guide to sap abap 1
Beginner’s guide to sap abap 1
 
Planning learn step by step
Planning learn step by stepPlanning learn step by step
Planning learn step by step
 
08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview
 
ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
 
Sap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginnersSap step-by-step-navigation-guide-for-beginners
Sap step-by-step-navigation-guide-for-beginners
 
SAP ABAP Interview questions
SAP ABAP Interview questionsSAP ABAP Interview questions
SAP ABAP Interview questions
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c language
 
Sapscript
SapscriptSapscript
Sapscript
 
Maximo Training - Introduction
Maximo Training - IntroductionMaximo Training - Introduction
Maximo Training - Introduction
 
Sap abap tutorial
Sap abap tutorialSap abap tutorial
Sap abap tutorial
 
Abap performance tunning tips
Abap performance tunning tipsAbap performance tunning tips
Abap performance tunning tips
 
IBM Roadmap Maximo 2018
IBM Roadmap Maximo 2018IBM Roadmap Maximo 2018
IBM Roadmap Maximo 2018
 
Maximo 7.6.0.8
Maximo 7.6.0.8Maximo 7.6.0.8
Maximo 7.6.0.8
 
Bdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATIONBdc BATCH DATA COMMUNICATION
Bdc BATCH DATA COMMUNICATION
 

Similar to Build your first rpa bot using IBM RPA automation

Web services in asp.net
Web services in asp.netWeb services in asp.net
Web services in asp.net
Dharma Raju
 
Cis407 a ilab 1 web application development devry university
Cis407 a ilab 1 web application development devry universityCis407 a ilab 1 web application development devry university
Cis407 a ilab 1 web application development devry universitylhkslkdh89009
 
Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10
Azharul Islam Shopon
 
]project-open[ on Amazon AWS
]project-open[ on Amazon AWS]project-open[ on Amazon AWS
]project-open[ on Amazon AWS
Klaus Hofeditz
 
GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6
Shay Hassidim
 
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
Shay Hassidim
 
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015Codemotion
 
Intellect_Integration_-_Web_Integration_Methods.pdf
Intellect_Integration_-_Web_Integration_Methods.pdfIntellect_Integration_-_Web_Integration_Methods.pdf
Intellect_Integration_-_Web_Integration_Methods.pdf
Modern Modular NY.
 
OPEN STA
OPEN STAOPEN STA
OPEN STA
Shourya Puri
 
Dynamics 365 self hosting bots
Dynamics 365 self hosting botsDynamics 365 self hosting bots
Dynamics 365 self hosting bots
Amit Patil
 
Lecture2 interactive-start
Lecture2 interactive-startLecture2 interactive-start
Lecture2 interactive-start
Dennis Seidel
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
gjuljo
 
Installation of Silk Test Framework
Installation of Silk Test FrameworkInstallation of Silk Test Framework
Installation of Silk Test Framework
Burak AVCI, MEM, PSM I®
 
Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7helpido9
 
Using galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingUsing galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testing
Sarah Elson
 
Details Description of Load Runner Recording option
Details Description of  Load Runner Recording optionDetails Description of  Load Runner Recording option
Details Description of Load Runner Recording option
Sanchita Singha
 
Setting up an odi agent
Setting up an odi agentSetting up an odi agent
Setting up an odi agent
Dharmaraj Borse
 
Demonstrating caf.doc
Demonstrating caf.docDemonstrating caf.doc
Demonstrating caf.doc
Pavel Principe Orosco
 

Similar to Build your first rpa bot using IBM RPA automation (20)

Web services in asp.net
Web services in asp.netWeb services in asp.net
Web services in asp.net
 
Cis407 a ilab 1 web application development devry university
Cis407 a ilab 1 web application development devry universityCis407 a ilab 1 web application development devry university
Cis407 a ilab 1 web application development devry university
 
Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10
 
]project-open[ on Amazon AWS
]project-open[ on Amazon AWS]project-open[ on Amazon AWS
]project-open[ on Amazon AWS
 
GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6GigaSpaces CCF Quick Tour - 2.3.6
GigaSpaces CCF Quick Tour - 2.3.6
 
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
GigaSpaces Cloud Computing Framework 4 XAP - Quick Tour - v2
 
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
 
dotProject Tutorial
dotProject TutorialdotProject Tutorial
dotProject Tutorial
 
Intellect_Integration_-_Web_Integration_Methods.pdf
Intellect_Integration_-_Web_Integration_Methods.pdfIntellect_Integration_-_Web_Integration_Methods.pdf
Intellect_Integration_-_Web_Integration_Methods.pdf
 
OPEN STA
OPEN STAOPEN STA
OPEN STA
 
Dynamics 365 self hosting bots
Dynamics 365 self hosting botsDynamics 365 self hosting bots
Dynamics 365 self hosting bots
 
Lecture2 interactive-start
Lecture2 interactive-startLecture2 interactive-start
Lecture2 interactive-start
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
 
Installation of Silk Test Framework
Installation of Silk Test FrameworkInstallation of Silk Test Framework
Installation of Silk Test Framework
 
Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7
 
Using galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingUsing galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testing
 
Details Description of Load Runner Recording option
Details Description of  Load Runner Recording optionDetails Description of  Load Runner Recording option
Details Description of Load Runner Recording option
 
Setting up an odi agent
Setting up an odi agentSetting up an odi agent
Setting up an odi agent
 
SCCM2012-UserGuide
SCCM2012-UserGuideSCCM2012-UserGuide
SCCM2012-UserGuide
 
Demonstrating caf.doc
Demonstrating caf.docDemonstrating caf.doc
Demonstrating caf.doc
 

More from Winton Winton

IBM Robotic Process Automation Fundamentals
IBM Robotic Process Automation FundamentalsIBM Robotic Process Automation Fundamentals
IBM Robotic Process Automation Fundamentals
Winton Winton
 
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance TesterIBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
Winton Winton
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical Presentation
Winton Winton
 
Devops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, TektonDevops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, Tekton
Winton Winton
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
Winton Winton
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Winton Winton
 
Agile sales and business development
Agile sales and business developmentAgile sales and business development
Agile sales and business development
Winton Winton
 
Enterprise Architecture for Dummies - TOGAF 9 enterprise architecture overview
Enterprise Architecture for Dummies - TOGAF 9 enterprise architecture overviewEnterprise Architecture for Dummies - TOGAF 9 enterprise architecture overview
Enterprise Architecture for Dummies - TOGAF 9 enterprise architecture overview
Winton Winton
 
Rational Team Concert source control for dummies
Rational Team Concert source control for dummiesRational Team Concert source control for dummies
Rational Team Concert source control for dummies
Winton Winton
 

More from Winton Winton (9)

IBM Robotic Process Automation Fundamentals
IBM Robotic Process Automation FundamentalsIBM Robotic Process Automation Fundamentals
IBM Robotic Process Automation Fundamentals
 
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance TesterIBM iSeries Terminal Based Performance Testing with Rational Performance Tester
IBM iSeries Terminal Based Performance Testing with Rational Performance Tester
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical Presentation
 
Devops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, TektonDevops lifecycle with Kabanero Appsody, Codewind, Tekton
Devops lifecycle with Kabanero Appsody, Codewind, Tekton
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Agile sales and business development
Agile sales and business developmentAgile sales and business development
Agile sales and business development
 
Enterprise Architecture for Dummies - TOGAF 9 enterprise architecture overview
Enterprise Architecture for Dummies - TOGAF 9 enterprise architecture overviewEnterprise Architecture for Dummies - TOGAF 9 enterprise architecture overview
Enterprise Architecture for Dummies - TOGAF 9 enterprise architecture overview
 
Rational Team Concert source control for dummies
Rational Team Concert source control for dummiesRational Team Concert source control for dummies
Rational Team Concert source control for dummies
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

Build your first rpa bot using IBM RPA automation

  • 1. © Copyright International Business Machines Corporation 2020 Build your first RPA bot using WDG Automation Hands-on Lab Version 1.2 Authors: Jukka Juselius - jukka.juselius@fi.ibm.com Paul Pacholski – pacholsk@ca,ibm.com
  • 2. © Copyright International Business Machines Corporation 2020 2 Table of Contents 1. Introduction ....................................................................................................................................3 Use case ..............................................................................................................................................3 Prerequisites .......................................................................................................................................3 2. Work with Completed Automation ..................................................................................................4 Open completed lab ............................................................................................................................4 Change impute csv file location ...........................................................................................................4 Run the automation.............................................................................................................................5 3. Lab Instructions ...............................................................................................................................6 Start WDG Automation Studio.............................................................................................................6 Create a new automation ....................................................................................................................7 Create your bot script - Login to JK Automation website......................................................................8 Test your automation and continue implementation.........................................................................15 Download CSV...................................................................................................................................16 Read CSV...........................................................................................................................................16 Store row data in variables ................................................................................................................18 Set Sales Leads input fields ................................................................................................................20 Define Subroutines............................................................................................................................23 Add loop to iterate through the data table ........................................................................................25 Logout from JK automation website ..................................................................................................29
  • 3. © Copyright International Business Machines Corporation 2020 3 1. Introduction This hands-on lab you will learn how to use WDG Automation Studio to create a simple RPA automation. FIGURE 1. WBG AUTOMATION Use case In this exercise you will build a robot to automate processing of sales leads that arrive in a CSV/Excel format. Each row of the file represents a separate sales lead. The sales leads need to be manually entered (copy/paste) by an analyst into the online opportunity system of record (JK Automation Sales Leads). This task is error prone and the analysts repeatedly ask if this can be automated, but it has never been a company priority. Until now Prerequisites • Personal WDG Automation Account activated • WDG Studio installed and configured to your computer
  • 4. © Copyright International Business Machines Corporation 2020 4 2. Work with Completed Automation If you just want to run the automation without authoring it or if you just want to look at a completed solution, follow these instructions below. Make sure you have the two files required to run the automation in this lab: Open completed lab In WDG Studio, Select Open Navigate to sales-lead-automation-completed.wal and click Open. Change impute csv file location Double click on the Read CSV File command Click File selection helper icon to change the location of the SalesLeads.csv file and then click Save
  • 5. © Copyright International Business Machines Corporation 2020 5 Run the automation _1. Click the green Run icon form the top toolbar. Alternatively you can hit F5.
  • 6. © Copyright International Business Machines Corporation 2020 6 3. Lab Instructions Start WDG Automation Studio _1. Double-click the WDG Studio shortcut in your desktop. _2. When the login window opens (might take a while for the first time), type in your username and hit the Login button. _3. When your tenant name is displayed, type in your password and hit the Login button again.
  • 7. © Copyright International Business Machines Corporation 2020 7 Create a new automation Create a new WAL file by clicking the New icon from the top toolbar or New under "Get Started" section. Select WAL file and click Open.
  • 8. © Copyright International Business Machines Corporation 2020 8 Create your bot script - Login to JK Automation website You should now have your Studio opened with an empty WAL file in your Designer view. Note that you can change your view between Script, Designer and Call Graph. Add Start Browser command from your Toolbox to your Designer view. You can find the command under Browser > Actions. Drag and drop it to your canvas.
  • 9. © Copyright International Business Machines Corporation 2020 9 The command configuration opens. You need to set name to your browser instance (for example web01). Keep Google Chrome selected as your browser type, if you have Chrome installed. You can also change the browser to one you want to use. Click Save button. Close Browser configuration window pops up automatically. Make sure to set the same instance name value that you used for Start Browser. Also set Keep browser open as enabled. This helps you during the implementation so that browser is not closed when you test your automation and you can continue using it for defining next actions for your automation. Click Save button to close the configuration window.
  • 10. © Copyright International Business Machines Corporation 2020 10 Next command we want is Navigate. You can find it also under Browser > Actions. Drag and drop it below the Start Browser command to your Designer view. Set the URL to http://jk-automation.mybluemix.net and click the Save button. Save your work by hitting Ctrl+S or the Save icon from the top toolbar. Name your automation WAL file to jk-automation. Your automation should now look as follows. Run your automation to test that it works and JK Automation website is opened. Click the green Run icon form the top toolbar. Alternatively you can hit F5.
  • 11. © Copyright International Business Machines Corporation 2020 11 You should see new Chrome Browser window opened and JK Automation login page opened. Note! For the first time this might take a couple of seconds. When you go back to your Studio window, you should see Execution succeeded text at the bottom left-hand side corner. Make sure to leave the browser window open! Nice! Your first run with WDG Automation Let's keep on going! Next we will need to automate the login to JK Automation website. Currently WDG does not offer any mechanism to automate the capturing of objects (like web form fields) that you want to use in your automation. For web pages this needs to be done manually using browser functionality to inspect the object and copy the selector for it. WDG supports several selectors for fields: id, name, css, xpath, id + name. Open JK Automation browser window that you should have open. Right-click the Username field and from the opened menu select Inspect.
  • 12. © Copyright International Business Machines Corporation 2020 12 This open your browsers element inspector with the Username field element selected. Right-click the selected element, select Copy > Copy selector. This will copy the CSS Selector for the element to your clipboard.
  • 13. © Copyright International Business Machines Corporation 2020 13 Go back to your WDG Studio and add Set Value to Field (Browser > Fields > Set Value to Filed) command to your automation just under Navigation command. When the command configuration window opens set Value to "whatever" (username you use does not matter), Selector Type to Css and Css to the value from your clipboard (the selector you copied from element inspector). Finally click Save. Similarly add new Set Value to Field command below the previous for the Password field. Set Value to password10. Now, let's finish the login sequence by adding a command to click the Submit button in the JK Automation login page.
  • 14. © Copyright International Business Machines Corporation 2020 14 We'll do that by adding command Click on Web Page after the Set Value to Field commands. Note that you can use toolbox search field to find commands. To display all the commands related to clicking, type click to the search field. Get the selector for the Submit button from your browsers element inspector as you earlier did for the Username and Password fields.
  • 15. © Copyright International Business Machines Corporation 2020 15 Your automation should look like as follows. Nice, good job! Test your automation and continue implementation Save your work. Close your browser with JK Automation login page Run your automation to test that it works and JK Automation website is opened. Click the green Run icon form the top toolbar. Alternatively you can hit F5. You should see your bot executing, opening the JK Automation web page and logging in with the information that you used to develop the login sequence. When your bot is finished, you should see the JK Automation welcome page.
  • 16. © Copyright International Business Machines Corporation 2020 16 Download CSV Click the Download file link in the left-hand side menu to download the CSV file that we will use to read some new sales leads from and add them to JK Automation system. Save the file to your computer and take note of the folder you saved it to. You will need that later on. When you have downloaded the CSV file, click the Leads link to open the JK Automation Sales Leads view in your browser. We will use this CSV file as input to our automation. Read CSV Since we want to handle Leads, add a Click on Web Page command to your automation to click the Leads link in the left-hand side menu. Yet again, use your browsers element inspector to get the needed selector for the Leads link.
  • 17. © Copyright International Business Machines Corporation 2020 17 Use toolbox search to find Read CSV File command and add it after your last Click on Web Page command. When the command configuration window opens, use the folder browse icon to select the file you just downloaded from your file system, leave all the other selections as they are in default. There are three outputs for the command: Data Table (holds the data), Rows (number of rows in the data table) and Columns (number of columns in the data table). We want to store these to variables. First, Click the folder icon besides the Data Table field to open variable list (as shown in picture above). Next, click Add new variable icon and the Define Variable window opens.
  • 18. © Copyright International Business Machines Corporation 2020 18 Name the variable as leads. Notice that the variable type is automatically set to match the output type (Data Table). Click Save. Repeat the previous steps to create variables also for other outputs Rows and Columns. Name them row_count and column_count, respectively. Your Read CSV File command configuration should now look as follows. Click Save. Store row data in variables Now, we obviously want to iterate through all the rows within the data table and insert the data to JK Automation Sales Leads page. Let's focus first on getting a lead read from the data table. Use your toolbox search to find Map Table Row command and then drag and drop it under the Read CSV File command in your Designer view.
  • 19. © Copyright International Business Machines Corporation 2020 19 When the configuration window opens, select variable leads to Data Table and then create a new variable for Row called row_iterator (since we want a variable to iterate through the data table) and set the default value for it to 1. Next we need to create mappings for the data table row. If you open the CVS file that we're using for the lab with Excel / Notepad, you can see that there's 12 data rows and also 12 different columns: First Name, Last Name, Job Tile, Company, email, phone, Client Address, Client City, Client State, Client Zipcode, Area of Interest and Followup Requested.
  • 20. © Copyright International Business Machines Corporation 2020 20 Click plus sign (+) within your Map Table Row configuration window to add all the needed mappings for your row. Use the Column Name to identify the data for the mapping and create a new variable to hold the data. Map and name the variables as follows. Click Save to save and close the configuration. Now we need to insert the data to JK Automation Sales Leads page that you should still have open in your browser. If you have closed JK Automation web page, you can always run your current automation to get the JK Automation Sales Leads page opened and continue from there. Set Sales Leads input fields You will use a series of Set Value to Field commands to insert data that we just extracted to JK Automation Sales Leads page and to it's matching fields. Let's go through the first mapping together.
  • 21. © Copyright International Business Machines Corporation 2020 21 Right-click the First Name input field in the web page, select Inspect > Copy > Copy Selector Add Set Value to Field command to your automation under Map Table Row command For Selector Type select Css, for Css copy the CSS Selector from (as shown in Step 1), for Value use the extracted variable first_name. Enable Simulate Human option. Click Save. Similarly, set all the remaining 11 input fields. Note, you can use copy-paste in your Designer view to easily copy commands.
  • 22. © Copyright International Business Machines Corporation 2020 22 Add If command (Under Base > Flow Control) to your automatio under the last Set Value to Field command. Configure it using the followup variable as follows. Add Click on Web Page command between If and End If. For Selector Type select Css, for Css copy the CSS Selector for the Follow up check box in the Sales Leads web page. Enable Simulate Human option. Click Save Add Click on Web Page command under End If to click the Submit button in the Sales Leads web page
  • 23. © Copyright International Business Machines Corporation 2020 23 For Selector Type select Css, for Css copy the CSS Selector for the Submit button web. Enable Simulate Human option. Click Save Save your work, close your browser showing the JK Automation web site and run your automation by hitting the Run icon in the top toolbar. You should see your automation executing and entering the first sales lead (Dave Wakeman) to the JK Automation Sales Leads page. Nice! Define Subroutines WDG Studio allows you to define and group parts of your automation as sub-routines. This can be useful to group logic parts of your automation script and make your automation more easily understandable.
  • 24. © Copyright International Business Machines Corporation 2020 24 In your WGD Studio Designer view, select (Shift+Click) all commands between Map Table Row and Close Browser (NOTE! Do NOT select Map Table Row and Close Browser!), right- click one of the selected commands and select Advanced > Extract Routine. Name your sub-routine as InsertLeadData. Click Save.
  • 25. © Copyright International Business Machines Corporation 2020 25 Studio will show the extracted sub-routine. You can close it and return to "main" automation by clicking the close icon after the name of the sub-routine. You can now see the extracted sub-routine in your "main" automation script. Note, variables in WDG Studio are global. This means that you do not need to map variables between your main automation script and its sub-routines. Add loop to iterate through the data table We have our automation almost ready. One of thing we still need to do, is to add a looping structure to iterate through all the sales leads within the data table that we read from the CSV file. WDG automation studio offers several structures to do this. We will use a While loop and use the row_count variable to go through all the records.
  • 26. © Copyright International Business Machines Corporation 2020 26 Select the Map Table Row and the Run Subroutine commands, right-click one of the selected commands, and select Advanced > Surround With > While. Configure the While command using the row_count and row_iterator variables as follows. Click Save.
  • 27. © Copyright International Business Machines Corporation 2020 27 You will now see the While loop in your main automation script. Good job! But something is missing... Right! We need still need to make sure that we increase our row_iterator value for each iteration. Right-click the Run Subroutine inside the While loop and select Go To Definition.
  • 28. © Copyright International Business Machines Corporation 2020 28 Add Calculate Mathematical Expression command (Base > Numeric) as the last command of the sub-routine. Configure it as follows. We want to add +1 at the end of each iteration. You should now have the command added to your sub-routine.
  • 29. © Copyright International Business Machines Corporation 2020 29 Close the sub-routine to go back to main automation script. Save your work. _1. Close your current browser window showing the JK Automation web site and Run your automation to test that it works and JK Automation website is opened. Click the green Run icon form the top toolbar. Alternatively you can hit F5. You should see the automation / bot executing and adding all the sales leads to the JK Automation web site. When the bot finished running you should now see all the rows from the excel spreadsheet in the Sales Leads table. Logout from JK automation website Recall that the Close Browser command was configured to left browser open for testing.
  • 30. © Copyright International Business Machines Corporation 2020 30 To complete our automation. let’s implement logout from the JK Automation site by adding two Click on Web Page commands at the end of your automation, just before the Close Browser command. First one to click your username on the right-hand side upper corner of the web page Select the logout link from the menu, right click and then select Inspect
  • 31. © Copyright International Business Machines Corporation 2020 31 Select Copy > Copy Xpath use your browser to inspect the elements you want to interact with and copy the selector for them. This time try using XPath selectors. Add Click on Web Page after End While command Set Search for to XPath and Xpath to the value from your clipboard (the xpath you copied from element inspector). Finally click Save
  • 32. © Copyright International Business Machines Corporation 2020 32 The last three commands in the Designer should now look similar to this Double click Close Browser command and s at the end of your automation before the Close Browser command, change the Keep browser open off and click Save Test your automation again. You should now see the browse close after the automation completes. Well done! Congrats finishing the exercise! Hope you learned some of the basics on how to use WDG Automation Studio. Keep on automating THIS COMPLETES THIS HANDS-ON LAB