Find element using the API interface:
Request Url:
http://127.0.0.1:35000/api/v1/profile/findElement
Request Type: GET
Name | Type | Description | required |
profileId | string | Browser profile ID | true |
function | string | function | true |
args | string | args is a parameter of function, example: findElementByID(args) | true |
click | string | Whether to click after finding the specified element true:Click false:No Click | true |
index | string | When there are multiple elements, specify which element to click. Starting at 0, minus 1 is one of the random elements, Used with ‘click = true’ | true |
1. Find the elementID of the element using findElementByID, take Google as an example (id=APjFqb):
Body
x-www-form-urlencoded
{
"profileId": "17D40B01-566A-4E3F-888A-C40A404668B8",
"function": "findElementByID",
"args": "APjFqb",
"click": "false",
"index": "-1"
}

2. Find the elementId of the element using the findElementByXPath, or take Google as an example, the args parameter is transmitted using base64 encoding, "Ly8qW0BpZD0iQVBqRnFiIl0=" decoded as: //*[@id="APjFqb"]:
{
"profileId": "17D40B01-566A-4E3F-888A-C40A404668B8",
"function": "findElementByXPath",
"args": "Ly8qW0BpZD0iQVBqRnFiIl0=",
"click": "false",
"index": "-1"
}
The GET request above returns:
{"status":"OK","value":"{\"element-6066-11e4-a52e-4f735466cecf\":\"5B5FA39767AF484F74B9DF075F267113_element_2\"}"}
5B5FA39767AF484F74B9DF075F267113_element_2\ is the elementId to be used.

function parameter support:
findElementByID
findElementByTag
findElementByClassName
findElementByLinkText
findElementByXPath
findElementsByID
findElementsByTag
findElementsByClassName
findElementsByLinkText findElementsByXPath
Note:
(1) Enable browser automation settings on the VMLogin client when using the local interface and save the settings. Please refer to the tutorial "Launch the browser automation port";
(2) For profiled, please refer to the tutorial "Where is the profile ID" or use the profile/list interface to get all profileId.