Click Ui Element

Hi All,

I need to click on the view whose Type is ZAB Subscription. The position of the view changes (It can be on first or last or 3rd etc). How do I select the correct Ui Element(View) for Type ZAB Subscription

give a look where the integrated anchor concept is combined with dynamic selector

image
Try to select this element below in Ui tree (or one of its children).
Use attributes like ColName and Innertext (we want to have ‘ZAB Subscription’ text in this selector).
Remember to uncheck tableRow to have selector dynamic.

And of course I recommend to see @ppr post for better understanding :slight_smile:

Hi @marina.dutta

Follow the below steps -
=> Take an assign activity and create a variable called count as integer datatype and initialize the value as 2.

    - Assign -> Count = 2

=> Use extract datatable activity to extract the table data in the webpage as datatable. Output - ExtractedDt Variable (Datatable Datatype)
=> Use for each row in datatable to iterate the values in the ExtractedDt
=> Inside for each row insert the If condition to check the Type is equals to ZAB Subscription

    -> CurrentRow("Type").toString.Contains("ZAB Subscription")

=> Inside If activity insert the Click activity and indicate the first view element in the webpage. When indicating the element check the strict selectors and uncheck the fuzzy selector and image.
=> Open the properties of click activity and open the Strict selectors of target.
=> There is a tableRow attribute in the Ui explorer pass the count variable in that attribute and validate.
=> Outside of If condition place the assign activity and increment the count.

   -> Assign -> Count = Count+1

In the above process We use If condition that we check the Type is equal to ZAP Subscription. Then it will take the count and give the count to the tableRow attribute of Click activity then the click activity will click on the view which is parlell to ZAP Subscription

Hope it helps!!

@mkankatala let me try

1 Like

@marina.dutta

it would be something like this

<Main window tag>
<Tabletag>
<webctrl tag='TR' innertext='*ZAP Subscription*' />
<webctrl tag='A' aaname='View' />

Hope this helps

cheers

@mkankatala

Why we are initializing the Count value as 2?

It was taking the header value count as 1 that’s why I advise to take the count as 2 then it will starts with rows. @marina.dutta

Hope you understand!!

@mkankatala

Also always the Type is not ZAB Subscription.

Okay then what condition we have to take if not ZAP Subscription @marina.dutta

@mkankatala

I need to click View for different column name (NAME)



You have to click on every view button or if any specific condition met then only we have to click on view button.

Elaborate your query then only we will give the better solution for you. @marina.dutta