Check IE Table Column For Value, Select Object Relative To IT

Hello again community, I am in need of some help again!

I am trying to search the “Status” column of this website for Open and then click on the Subject column of that same row.

First off, I cannot seem to get the element to work, if I remove the row (or make it a wildcard) from the selector, it doesn’t find anything. Secondly, I’m not sure how to search for an element and then click on a separate element based off of where it found the first element.

Any help will be greatly appreciated!

Cheers,
s3vn

Buddy may i know where this table is actually in, an excel or a web application
Cheers @s3vn

Hi @Palaniyappan, it is a web application.

then you already mentioned the answer buddy @s3vn
Fine
you can use anchor base activity
where
–use a open browser activity to open that web application
–first make a data scrapping of the table you want to make some automation with data scrapping in design menu…
–the outcome of this would be a datatable
–now use a for each row loop to iterate through each row and assign the value of column “Status” to a variable named out_status of type string
–being still inside the for each row loop use a activity called Find text position activity and pass this out_status value as input to this activity and you will be getting the output of type uielement…save it with a variable of type uielement
–then use ANCHOR BASE activity, and in left side use find element activity and pass the above uielement as input to the element property of find element activity (no need of making any selection buddy, just above uielement as variable) and in left side of anchor base activity use click text activity and mention the text “Account & Equipment Disposing…(its hidden in your image buddy)”
– and then you can do any automation you want next inside it,but keep in mind that you need to get back to this table page from where ever you end with, in order to enable the for each row loop to make a click with anchor base…because we are still inside the loop,

thats all buddy you are done
kindly try this and let know buddy
Cheers @s3vn

Usually what I will do to accomplish this, and also avoid complex for each loops and whatnot, is to simply use the selector and the tableRow attribute.

Now, this idea will depend on the selector generated by the web application. - You will want to use UiExplorer for this to ensure that you can see an attribute with “Open” and a “tableRow” attribute.

So, essentially, you do this in 2 steps:

  1. Get Attribute activity => use “tableRow” (or whatevever the table row attribute is called in UiExplorer). Use the “aaname” or “innerText” attribute in the selector which says “Open”, while not including any other attributes except for Tag. This, should allow it to look at the first instance of the element with “Open”
  2. Now by having the tableRow stored in a string variable, you can use this in the Click activity’s selector. Use UiExplorer to generate a selector that includes the tableRow attribute in it. Then, in the Property Selector field, edit the selector as an expression/string. You may need to click in the property box, so it is surrounded by quotations, since it should be a string.

Selector should look something like this:
"<webctrl aaname='Account*Equipment*' tableRow='"+tableRow.ToString+"' tab='A' />"

Regards.

2 Likes

Hi @ClaytonM!

Thanks so much for the steps, I am struggling with one thing still though. If I put in the actual number for the tableRow value it will click on the correct line without an issue, but if I try to enter “+tableRow.ToString+” I get an error saying it cannot find the corresponding selector.

And just so you have more information, whenever I save the selector and then close it, it changes the attribute to this: tableRow=’ & quot;+tableRow.ToString+& quot; ’ (without the space between & and q)

Ahh, I got it…I had to edit the selector in the properties pane turning it into an expression. Thanks again for your help!!

Cool, you figured it out. I was going to mention that it should be edited in Expression editor where quotes are around it. Thanks.

1 Like

For anyone coming here later, this was very helpful as well:

To pass your variables or arguments to selector, DO NOT CLICK the “…” box to open the Selector Editor window. The Selector Editor window does not recognize your variables or arguments.

You need to edit the selector directly to the selector field in the property pane (Which is a Expression Editor). Try to Type the the step as follows:

  1. "
  2. SpaceBar
  3. “+”
  4. your variable or argument ( the drop down box will appear showing that the program is now recognize your V and A)

PS. After you edit selector in the field in the property pane and you click the “…” box again, the pop up window will become “Expression Editor” instead of “Selector Editor”

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.