Mastering RPA: Navigating the World of RPA Tools (Part 2)- Web Session

Komalpreet Kaur
Another Integration Blog
4 min readApr 28, 2024

Disclaimer:

The content provided in this Medium blog is for informational purposes only. It represents the views and opinions of the author at the time of publication. The author makes no representations or warranties regarding the accuracy, completeness, or suitability of the information presented in this blog.

Overview:

In this blog post, we’ll undertake an in-depth exploration of different Robotic Process Automation (RPA) tools for “Web Session”. We’ll examine its distinct features and analyze the best strategies for utilizing them to optimize task efficiency.

Use Case Overview:

We’ll learn how to automate Salesforce login and Accounts creation using RPA’s Web Session by inputting credentials and creating accounts in the Salesforce “Account” object.

Task 1: Encryption of Salesforce Credentials

Step 1: Add “User Account Variable” to encrypt your Salesforce Creds. Give it a name.
Step 2: Give a name to added “User Account Variable”, for instance, “p_salesforceCreds”. You can write a description of the variable in “Description” input box. Then, enter your “Username” and “Password” in the input boxes as shown. This variable will automatically encrypt your “Password”.
Step 3: Add “p_salesforceCreds” (User Account Variable) to the workflow for using in RPA Workflow as directed in the screenshot.
Step 4: Drag and drop a “Group” element from Tools to the “Transaction” area and name it “Web Session Elements”. This helps keep all the tools used for any task together, helps to achieve modularity, and enhances readability. Then, Drag and drop the tool “User Account Decrypter” and pass “p_salesforceCreds” (User Account Variable) as shown in the screenshot.

Task 2: Configure a “Web Session” in RPA

Step 5: Drag and drop a “Web Session” tool according to Browser. Configure a “Web Session”, and pass the “Salesforce Login URL” i.e. https://login.salesforce.com/ in the “Initial URL” input box. Click on “OK”. You can also do other browser settings if required. By default, “Web Driver Timeout” is 60s, you can change it if required.

Task 3: Log in to Salesforce

  • “Keystrokes to Web Element” is a tool designed to execute actions, such as typing text, by simulating keystrokes on a web element specified by its “Element XPath” and the desired “Input Text”.
  • How to get the “XPath” of any element:
  1. Right-click on the desired element. Choose “Inspect” from the context menu. This will open a window highlighting the selected element.

2. Right-click on the highlighted element. Select “Copy XPath” from the menu options.

Step 6: Drag and drop a “Keystrokes to Web Element” tool and configure it by entering Salesforce “Element XPath” i.e. “Paste copied XPath of ‘Username’ Element” and “Input Text” i.e. “Username passed from ‘Creds decrypter’ tool” as shown in the screenshot.
Step 7: Drag and drop a “Keystrokes to Web Element” tool and configure it by entering Salesforce “Element XPath” i.e. “Paste copied XPath of ‘Password’ Element” and “Input Text” i.e. “Password passed from ‘Creds decrypter’ tool” as shown in the screenshot.
Step 8: Drag and drop a “Click Web Element” tool and give XPath of Login button.
Step 9: Add an “Array Variable” i.e. p_accountName, to store values of Account Names that we’re going to create in Salesforce.
Step 10: Add “p_accountName” array variable to the workflow, drag and drop “Set Array Variable” tool to the Transaction section. Mapped it to “p_accountName” and pass values of Account Names as per requirement.
Step 11: Drag and drop a “Get Array Count” and map it “p_accountName” to get it’s count which can be used as an iterator to iterate over different Account Name and creating new Accounts based on Account name in Salesforce.
Step 12: Drag and drop “Loop” tool, map it to “Count of Account Name” tool
Step 13: Specify “Start value” and “Increment value” of Loop.
Step 14: Drag and drop “Read from Array” tool, map it to “p_accountName” in “Array to read from” and “Loop Iteration Count” as Index to read. This tool will read values of Account Names from “p_accountName” one by one in each iteration.
Step 15: Drag and drop “Navigate” tool for directly navigating to “Accounts” Tab in Salesforce. Specify the uRL in “Navigate to this URL” input box. Then, click on “Ok”.
Step 16: Drag and drop “Click Web Element” tool to click on “New” option in Salesforce Account Object by specifying “Element XPath”.
Step 17: Drag and drop “Keystrokes to Web Element”, specify “Element XPath” of “Account Name” input box and enter “Input Text” after reading an array value from “p_accountName” array variable. Then, click on “Ok”.
Step 18: Drag and drop “Click Web Element” tool to click on “Save” option in the Salesforce by specifying “Element XPath”.
“Salesforce Account Creation Automation Process Workflow”
Step 19: Once done with the “Implementation”, Click on the “Run” icon to run your Automation Process and see it working end to end.

I’m excited to reveal my first YouTube vlog in which You’ll see the RPA Bot in action, solving our chosen problem from beginning to end. It’s going to be a fun ride through the world of automation :)

https://youtu.be/1pR8OvQtPLs?feature=shared

I hope you enjoyed exploring the above-explained Use Case along with the implementation and “YouTube” video showcasing the incredible working of an RPA BOT. Well, hold onto your hats because there’s so much more excitement coming your way! Get pumped for the upcoming blogs where I’ll unveil the wonders of various RPA Tools!

Thanks & Regards,

Komalpreet

--

--

Komalpreet Kaur
Another Integration Blog

MuleSoft Mentor|Meetup Speaker|3xMuleSoft Certified|MCIA|MCD-1|MCD-2|1xSalesforce Certified|SPD-1|ACM|Sr. Solution Consultant 😊