Skip to main content

Hello,

 

Just want to check any suggestions on what action in automation anywhere that fit in this scenario.

Upon checking the elements of textboxes on the website, the id is incremented like prefcode1, prefcode2, prefcode3, prefcode4, prefcode5, so on and so forth.

 

How I will be able to determine all those textboxes using a loop since it is just incremented and has the same keyword element. And all the input data to the textboxes will get from excel sheet. 

 

Thank you for your time. 

Hi ​@mariaelena062129 ,

 

I hope the object property which you have mentioned here is the DomX path. If so, it is fairly straightforward. You just have to use a counter variable (initialized as 1) and assign this in the dynamic area of the DomX path within loop. After the necessary action, add an increment for the Counter.

 

Hope it is clear.


Hi ​@mariaelena062129,

like this DOMXPath: 

//inputp@id='prefcode$numCounter.Number:toString$']


Hi,

If the IDs are sequential but you want a smarter approach, you can use the "Find all elements" iusing capture  based on a common attribute like 'starts-with' .This way you can collect all elements in list loop through them directly and map the excel one by one through iteration.

Thanks


Reply