Skip to main content

Web Automation

Overview

Clicknium web automation supports the following popular web browsers: Chrome, Microsoft Edge, IE, Firefox, Brave, Vivaldi. You need install extension for Chrome, Edge, Firefox, Brave or Vivaldi before recording.
During recording, When you record a web browser pages, Clicknium will auto detect and choose appropriate web automation to record the element. For Chrome and Edge, Clicknium supports CDP, so that you can use CDP API to run the Python project without browser extension. Browser extension is still required for recording.

Locator attributes

You can learn locator concept first. For web automation, the attributes are defined below:

Tab

NameequalscontainsstartWithendWithregex
Name
Yes
Yes
Yes
Yes
Yes
Title
Yes
Yes
Yes
Yes
Yes
URL
Yes
Yes
Yes
Yes
Yes
ClassName
Yes
Yes
Yes
Yes
Yes
Role
Yes
No
No
No
No
Index
Yes
No
No
No
No

Web

NameequalscontainsstartWithendWithregex
Name
Yes
Yes
Yes
Yes
Yes
Id
Yes
Yes
Yes
Yes
Yes
Type
Yes
Yes
Yes
Yes
Yes
AncestorId
Yes
Yes
Yes
Yes
Yes
AncestorName
Yes
Yes
Yes
Yes
Yes
CssSelector
Yes
Yes
Yes
Yes
Yes
Class
Yes
Yes
Yes
Yes
Yes
AncestorClass
Yes
Yes
Yes
Yes
Yes
SInfo
Yes
Yes
Yes
Yes
Yes
TabIndex
Yes
Yes
Yes
Yes
Yes
Href
Yes
Yes
Yes
Yes
Yes
Src
Yes
Yes
Yes
Yes
Yes
Title
Yes
Yes
Yes
Yes
Yes
XPath
Yes
No
No
No
No
Tag
Yes
No
No
No
No
TableRow
Yes
No
No
No
No
TableCol
Yes
No
No
No
No
IsLeaf
Yes
No
No
No
No
Index
Yes
No
No
No
No

Locator samples

  • Azure devops 'A' element
<Application processName="chrome" filePath="chrome.exe" version="1.3" />
<Tab className="Chrome_WidgetWin_1" role="window" title="sprint query - Boards" />
<Web ancestorId="row_vss_4_4" tag="A" />
  • Bing search input
<Application processName="msedge" filePath="msedge.exe" version="1.3" />
<Tab className="Chrome_WidgetWin_1" role="window" url="https://*bing.com/" />
<Web id="sb_form_q" name="q" tag="INPUT" />
  • Bing search icon
<Application processName="msedge" filePath="msedge.exe" version="1.3" />
<Tab className="Chrome_WidgetWin_1" role="window" url="https://*bing.com/" />
<Web ancestorId="search_icon" tag="svg" />
  • Bing search result item
<Application processName="msedge" filePath="msedge.exe" version="1.3" />
<Tab className="Chrome_WidgetWin_1" role="window" url="https://*bing.com/search?*" />
<Web ancestorId="b_results" cssSelector="body>div>main>ol>li h2>a" tag="A" />

Web element properties

By find_element on one web locator, you can get one web element, you can get properties of the element by get_property, Clicknium web element support the following properties:

NameDescription
pagetitlethe title of the current HTML page
readystatethe loading state of the document, return 1 if Document.readyState equals "complete" or return 0
IDthe unique ID for an HTML element
URLURL of current page
htmlwindownamewindow.name in javascript
titlethe title of an element
cookiethe cookies value, format is cookiename=value, multiple cookies split by ;
innertextthe inner text of an element
innertextshortat most 512 char of innertext
outertextthe outer text of an element
outertextshortat most 512 char of outertext
innerhtmlthe HTML content (inner HTML) of an element
innerhtmlshortat most 512 char of innerhtml
outerhtmlthe HTML elements, including attributes, start tag, and end tag
outerhtmlshortat most 512 char of outerhtml
tagthe tag name of an element
ancestorida Clicknium custom property, the ID of first ancestor node with ID attribute in the DOM tree
ancestornamea Clicknium custom property, the name of the first ancestor node with Name attribute in the DOM tree
ancestorcssa Clicknium custom property, the class of the first ancestor node with Class attribute in the DOM tree
tablerowif the element is in one table, return the row of the element
tablecolif the element is in one table, return the column of the element
rownamerow header name
colnamecolumn header name
columncountcolumn count
rowcountrow count
ischeckedwhether the element(checkbox, radio) is checked
sinfoa clicknium custom property, the text displayed
sinfoshortat most 512 char of sinfo
css_selectorcss selector
classvalue of the HTML class attribute
selecteditemthe text of selected option
selecteditemsthe text of all options
isleafa clicknium custom property, whether the node is leaf in DOM
tabindexthe value of the tabindex attribute of an element
hrefvalue of element's href attribute
XPathxpath value
Typevalue of element's type attribute
Srcvalue of element's src attribute
Rolevalue of element's role attribute
Namevalue of element's name attribute