How to click particular row link buttons in html table based on row input


#1


#2

I think you can do something like this in Find element activity and followed by Click Activity

<webctrl innertext='" & row(0).ToString. & "' tag='A' />


#3

Hi @naga.kishore,

You could try to follow the steps above:

  1. Use the Find children to get the elements inside this table
  2. Try to find a pattern of the button that you need to click, inside this table with UI Explorer
  3. 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
#4

Hey @acaciomelo the user asked selectors with row input, where do you feed the input?


#5

Hi @vvaidya,

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.


#6

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.

Thanks.


#7

Nevermind @badita 's post helped

I can run disabled property at run time which returns disabled or 0 (if enabled)


#8

Hi @vvaidya,

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:

Variables declaration:

aaname

InnerHTML


#9

Great!! Thanks for the tip.


#10

@acaciomelo Thanks!! this code was helpful in resolving a dynamic selectors issue today.


#11

Awesome, I’m glad to hear that! :grinning:


#12

I tried to above example for the same chart table, but not working . could you explain the steps


#13

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
#14

Can you attach the sample? It’ll be helpfull for reference.

Thanks.


#15

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:

  1. Open the URL and use the Attach Browser activity
  2. 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)
  3. 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 :grinning:


#16

Thanks @acaciomelo for quick reply. Will let you know once I get the correct output!


#17

I tried your solution, but when i wanna assign “selectorToClick” i cannot find “.Selector.ToString”, could you please give me some advice?


#18

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.


#19

Hi Guys,
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