/
Get Element Collection
Get Element Collection
Use this page to find example workflows for Genta Automation.
Introduction
This function can be used to capture multiple elements (i.e., a list of names) in a web application.
Step-by-Step Guide
Move the mouse around to select the active element associated with the image.
Hold down CTRL and click the icon selected.
2. After selecting the first item, the Get Element Collection message box will be displayed.
3. Hold down CTRL and click the second selected icon.
4. In the following window, the attribute of elements to capture and the variable name to store the collection as String Array can be entered.
5. After clicking Copy to Clipboard, the expression comes as:
$MyArray = @GetElementCollection("/html/body/header/div/nav[1]/div/ul/li[3]/ul/li[1]/a", "/html/body/header/div/nav[1]/div/ul/li[3]/ul/li[2]/a", "Text")
Script
$website = "https://www.iwmf.org/"
Navigate to $website -maximize
Hover Mouse over "Programs"
$MyArray = @GetElementCollection("/html/body/header/div/nav[1]/div/ul/li[3]/ul/li[1]/a", "/html/body/header/div/nav[1]/div/ul/li[3]/ul/li[2]/a", "Text")
Foreach($row in $MyArray)
{
Show Message Box $row
}
Video
Related Articles
, multiple selections available,
Related content
Saving an Image by Using Selectors
Saving an Image by Using Selectors
More like this
Get values from PDF using Extract
Get values from PDF using Extract
Read with this
Nested Loop
Nested Loop
Read with this
Loop by using @Split
Loop by using @Split
More like this
Web Control Capture
Web Control Capture
More like this
Simple While Loop
Simple While Loop
Read with this