I think you can do something like this in Find element activity and followed by Click Activity
<webctrl innertext='" & row(0).ToString. & "' tag='A' />
You could try to follow the steps above:
- Use the Find children to get the elements inside this table
- Try to find a pattern of the button that you need to click, inside this table with UI Explorer
- Try to iterate between the children elements and once you find the specific button, use the Click activity and pass the selector of this element with element.Selector.ToString.
Click Activity w/ Dynamic Selector
Get text in loop gets previous value or value that it selected in first instance
I just gave an idea on how to iterate between the elements inside this table. He will decide which approach he is going to follow.
Ok, Understood.I was just trying to figure out where can we inject aaname or innerhtml in your process?
@acaciomelo also want to know how to distinguish between enabled and disabled button before making a click as I don’t see any difference in explorer properties, I ended up checking an image.
Nevermind @badita 's post helped
I can run disabled property at run time which returns disabled or 0 (if enabled)
Besides that, I believe that you could use a LINQ function to extract the elements according to the values in the aaname or innerhtml property with the following code:
Great!! Thanks for the tip.
@acaciomelo Thanks!! this code was helpful in resolving a dynamic selectors issue today.
Awesome, I’m glad to hear that!
I tried to above example for the same chart table, but not working . could you explain the steps
Hey i have applied the same method to a table which follows pagination, but it’s not working.
Could you help me ?.
Thanks in Advance.
How to select First row(contains link) in a table and click on that link from a web page
Can you attach the sample? It’ll be helpfull for reference.
Hi @Shansun ,
This is an old example and I am pretty that I have already deleted it.
Anyway, please try to follow the steps below:
- Open the URL and use the Attach Browser activity
- Inside it, use the Find Children activity and select the parent element that you are trying to get the elements (it will be necessary to create an array of Ui.Core.Element type if I’m not wrong, just press Ctrl + K in the Children property)
- Use a For each activity to iterate those elements and the Highlight activity to help you identifying the elements.
In addition to that, try changing the property Scope to Children OR Descendants and test it until you are able to find the necessary elements. Some times it’s need to use one or more Find Children activities in order to find the proper child element.
Please give it a try and let us know the results
I tried your solution, but when i wanna assign “selectorToClick” i cannot find “.Selector.ToString”, could you please give me some advice?
Hi , I need to click a link from a table. The table has only one row and the first item in the row is a link say “10033” is a link and i need to click that. Could you please help me in achieving that.
i have attached one html table , in that table i need to check first Confirmation statement and Annual return description names based on that i need to download pdf from view pdf link …plese help me iam new to ui path