Professional Documents
Culture Documents
Readme
Version 2.0.1
11/03/2021
Table of Contents
1. Introduction ..............................................................................................3
1.1 Overview .............................................................................................3
1.2 Use cases .............................................................................................3
2. Requirements & Prerequisites ...................................................................4
2.1 System Requirements ..........................................................................4
2.2 Prerequisites........................................................................................4
3. Getting Started ..........................................................................................5
3.1 Quick Start ...........................................................................................5
3.1.1 Setup .................................................................................................. 5
3.1.2 Configuration and Use ........................................................................ 5
3.2 Samples .............................................................................................10
4. Support & FAQs .......................................................................................12
4.1 Support..............................................................................................12
4.2 FAQs ..................................................................................................12
Page 2 of 14
1. Introduction
This document contains all essential information for the user to make full use of this A2019
Web Automation Package. It includes a description of the functions and capabilities and step-
by-step procedures for setup & configuration of the A2019 Web Automation Package.
1.1 Overview
The package actions allow to automate tasks in Google Chrome or Microsoft Edge in a high
performance and accurate way using JavaScript code.
It is based on ChromeDriver , EdgeDriver and Selenium
https://chromedriver.chromium.org
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
https://www.selenium.dev/
Page 3 of 14
2. Requirements & Prerequisites
2.2 Prerequisites
o ChromeDriver 89.0.4389.23 is already included in the package. When you need a
different version, please download it from this web site
https://chromedriver.chromium.org/downloads
o MSEdgeDriver 89.0.774.50 is already included in the package. When you need a
different version, please download it from this web site
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver
Page 4 of 14
3. Getting Started
3.1 Quick Start
3.1.1 Setup
Import the A2019 Web Automation Package in the Control Room under Bots->Packages
General rules
All actions with the “JS Script” parameter expect a JavaScript selector that returns one element.
You get these in the Chrome or Edge developer console, Press F12 and then navigate to the
element, right click on it and choose Copy->Copy JS path.
Actually, It works with every selector that returns one element. You can also copy the XPath of
the selected element and then pass the following script document.evaluate(<XPATH>,
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue to the JS
Script parameter.
Never extend the JavaScript code with .value or .click(), because the actions do this.
The parameter “Wait for Attribute Value” extends the JavaScript code with the value of this
parameter. When you pass “className”, The return value of <Your JavaScript Code>.className
will be checked if it is not null and not empty.
Create your own JavaScript library and add it to the Start Session action to simplify your code.
See the Sample section for more details.
Page 5 of 14
Name Description Parameter
Start session Start new session Session Name Name of the new session
Page 6 of 14
JS Script Script to be executed to determine the
web element, the action adds
“var value = "+<your code>+".value; return value “
to the script.
to the script.
Page 7 of 14
Check True or False
Page 8 of 14
Wait Element Waits until Element Session Name Current session
Loaded is loaded
Base JS Script Code to be executed
Get Current URL Get Current URL of Session Name Current session
the session
URL Current URL of the session
Get Page Source Get Page Source of Session Name Current session
current web Page
HTML HTML source of current page
Page 9 of 14
3.2 Samples
You can use different JavaScript selectors. They should always return one HTML element. Here are some
examples:
document.querySelector("#username")
document.querySelector("#refreshCaptchaImage > img")
document.querySelector("body > dps-app").shadowRoot.querySelector("div > main > dps-home-
unauth").shadowRoot.querySelector("div > div.dps-home-unauth-header > div.dps-home-unauth-header-
copy.behavior-is-in-viewport > dps-link").shadowRoot.querySelector("a")
document.evaluate('/html/body/div[4]/div[1]/section/div[1]/div[1]/one-appnav/div/one-app-nav-
bar/nav/div/one-app-nav-bar-item-root[7]/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,
null).singleNodeValue
The action “Start session” allows to define a JavaScript library. A library can contain JavaScript functions
that you can use in the JS Script parameter of different actions.
E.g. if you define this library
You can use these functions in actions such as Check, Click, Focus, Select, Get Text, Get Value, Set Value
and Wait Element Loaded
Page 10 of 14
The action Execute JavaScript can be used to run more complex automations, e.g. create a new
Salesforce contact. Please keep in mind that in case your JavaScript code contains a $ sign, you have to
add another $ as an escape character. In the following example we replaced $A.get with $$A.get. You
can parameterize your code using Bot variables, in our case with a record variable “lead”
Page 11 of 14
4. Support & FAQs
4.1 Support
Free bots are not officially supported. You can get access to Community Support through the following
channels:
You can get access to Community Support, connecting with other Automation Anywhere
customers and developers on– the Bot Building Forum, the Bot Store Support Forum, or the
Developers Everywhere Group.
Automation Anywhere also provides a Product Documentation portal which can be accessed for
more information about our products and guidance on Enterprise A2019.
4.2 FAQs
You find more information about ChromeDriver, EdgeDriver and JavaScript selectors here
https://chromedriver.chromium.org
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver
https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate
https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
For questions relating to Enterprise A2019: See the Enterprise A2019 FAQs.
Page 12 of 14
Appendix A: Record of Changes.
Page 13 of 14
Appendix B: References
Page 14 of 14