How to find a text in an grid and check the corresponding row's Checkbox in a webpage

uiautomation
studio

#1

How to find a text in an


grid and check the corresponding row Checkbox in a webpage.
I have the code A302005. I have to search for it and then check the checkbox


#2

One way that I can think of:

  1. You Cell selector should look something like this (if you include aaname)

<webctrl tag='TD' aaname='A302005' />

Make this a dynamic selector and pass your values

<webctrl tag='TD' aaname='"+strVal+"' />

  1. Use this selector in Find Element with element variable as output

  2. Use Get Attribute with “tableRow” attribute and pass element obtained in 2 with strRow as output

  3. Your check box selector should look something like this if you include only tableRow property.

    "<webctrl tag='INPUT' tableRow='3' type='checkbox' />"

Make it a dynamic selector by passing output obtained from 3 and pass it into click actity or check activity

<webctrl tag='INPUT' tableRow='"+strRow.Trim+"' type='checkbox' />


#3

Will you explain it with an example?