Highlighted
Frequent Contributor.
Frequent Contributor.
237 views

Click on (select) multiple similar objects

Hi,
is it possible to click several similar objects in True client? I don't know in advance how much of those will I have but I need to click all of them. 
The thing is I can identify those objects  - they all are highlighted but that's also a problem cause during run LR says 'multiple objects were found that are similar to the target object'. But this is exactly what I want it to do 🙂 click all those similar objects.  

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Click on (select) multiple similar objects

Hi @Elmira,

In TruClient, a built-Step works on only one object. When you see "multiple objects were found that are similar to the target object", that means the default object identification method (Automatic) is not a good choice for this case. If you want to select multiple objects, you could add multiple Steps, each Step select one object, with XPath or JavaScript object identification method. If you want to do click on multiple objects, no built-in Step supports it directly. To support that, add a "Evaluate JavaScript" Step, writing JavaScript code in it, travelling on DOM objects, and doing click on multiple objects.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.