Question

A360 search html grid and select row based on business reqs

  • 2 August 2022
  • 3 replies
  • 91 views

Assumption: each tr has the same # of tds​

Assumption: table row cnt returns non-header data). If head exists and you want to skip evaluating of header, then adjust logic accordingly.

Assumption: table count corresponds to actual count of rows in table body. If you notice an off by 1 or more and the offset is consistent decrement the row account appropriately to avoid an invalid index issue.​

Evaluating a single colum (but can be adjusted to evaluate more)​

Need to evaluate data in a row to dtrm whether or not to select the row in A360? ​

Get the relative dom x path of the table (absolute is more subject to change). Get the number of rows in your table (this will be used in your times loop). With exception of adjusting the row cnt based on what you need, this data will be stored in vars and there should be no need to modify the data in these vars.

Create a times loop, using the count or adjusted count from above, and if you want, assign the current cnt to a variable.

You are now going to take the previously mentioned relative dom x path of the table and within your loop append tr[$numVarName$]\td[5] to your relative table path. NumVarName would represent a number which is the tr index you want to access. Since we are iteration through a table this value will increase with every iteration. If this is the relative path, //table[@id='ImATable']\tbody then the dynamic dom xpath for evaluating a cell could be something like //table[@id='ImATable']/tbody/tr[$numVarName$]/td[5]

Within loop, Record any other object (excluding selects/listbox) so you get a wider range of sub actions. Set the action to take on object as Get property and set the Property name to HTML innerText. Clean up you object properties and if possible, check only DomXPath and set it to the variable containing your dynamic path you previously created.

Note: define root of relative path once, outside the loop. Do not append data to variable containing root path of table, but instead, within the loop, use string assign to concatenate this data into another variable and use this other variable as DomXPath object property within the recorder command. Once the row is found, just copy that recorder command and chane the action to take on object to click.

Will clean this up a bit tomorrow because there are some gotchas that I have left out and screenshots would prolly be nice.​


3 replies

Userlevel 4
Badge +7

Hi @Stacy DeLoach​ ,

 

Interesting read.

I've written something similar here, but its for web elements that look like tables, but really aren't.

 

If you have any interesting ideas you'd like to share with the community, then I'd recommend boxing those ideas up into an article or two and sending it to the evangelism team(arjun.meda@automationanywhere.com).

 

They will review your article(s) and let you know when they are okay with it and are ready to publish it on the developer's portal.

 

Kind Regards,

Ashwin A.K

Badge +1

Hi @Stacy DeLoach​ ,

 

Interesting read.

I've written something similar here, but its for web elements that look like tables, but really aren't.

 

If you have any interesting ideas you'd like to share with the community, then I'd recommend boxing those ideas up into an article or two and sending it to the evangelism team(arjun.meda@automationanywhere.com).

 

They will review your article(s) and let you know when they are okay with it and are ready to publish it on the developer's portal.

 

Kind Regards,

Ashwin A.K

Buen dia, el hipervinculo no funciona.

Tengo un inconveniente de un data grid al que Automation Anywhere no lo reconoce como tabla, que puedo hacer?

Userlevel 7
Badge +13

Hi @Davidmma ,

 

Are you trying to capture the table? If yes, kindly change the Object capturing technology and give a try again.

 

 

Reply