Want to be able to specify one of a group of buttons

There are several identical buttons and I want to click on a specific one, the links to these buttons look like this
<webctrl src='AddRequestIframe.jsp?workflowid=248&amp;isagent=0&amp;beagenter=0&amp;isfrom*' tag='IFRAME' /><webctrl id='field96379_0_ browserbtn' tag='BUTTON' type='button' aaname='' />

The other buttons are
<webctrl src='AddRequestIframe.jsp?workflowid=248&amp;isagent=0&amp;beagenter=0&amp;isfrom*' tag='IFRAME' /> <webctrl id='field96379_1_ browserbtn' tag='BUTTON' type='button' aaname='' />

It’s the difference between field96379_n_browserbtn

I have written the link as
<webctrl src='AddRequestIframe.jsp?workflowid=248&amp;isagent=0&amp;beagenter=0&amp;isfrom*' tag='IFRAME' /> <webctrl id='field96379_" + CurrentRow.ByField("ID") + "_browserbtn' tag='BUTTON' type='button' aaname='' />
But it’s always the field96379_0_browserbtn button that is clicked

Is there a workaround for this?
image
[/quote]

@ruiang

Is the For Each is incrementing? Is the ID has the 0,1,2 etc?

Thanks

1 Like

Is the ID has the 0,1,2 etc?
yes

@ruiang

Okay, but have you used the For Each row activity?

It has to loop into the datatable right?

Thanks

there is no For Each

There is an add button, click on it to create a new row, the new row button is what I want to click on, it is continuous from 0

@ruiang

Can you share a screenshot of your workflow?

Thanks

image
Tap on the + in the top left corner
A new line will be added at the bottom and I will tap the magnifying glass button on the new line, which is the one I mentioned starting from 0, 1,2,3
This 0123 is what I read from excel

@ruiang

Ok fine, but are you using Excel For Each row activity?

To loop into your excel file like 0 next 1 likewise you need to use this activity

Or else it will always point to the 1st row only

Thats why you are always clicking on the same 0 magnifying button

Hope this will help you

Thanks

Hi U can create array like {0,1,2,3}

in for each assign n = item
on click give selector

in place of n right click and select n variable.

I used excel loop row
However, when using selector, it is not recognized, and when using fuzzyselector, the item 0 is always clicked
image

image


I fully understand the use of the excel loop, I have set the variables to be assigned each time in excel

Please believe this, I have built a number of automated applications based on excel row loops

@ruiang

usually that should work

As I don’t have much exposure to studioX, maybe you can check below doc for more on Excel For Each row

You can create a varaible with your column and after that you can pass that variable to the selector

I do some usecase with this in studio, you can check below link also for reference

Reference

Hope this will help you

Thanks

This problem is solved, you can’t use excel’s currentrow directly, you need to do this inside select
<webctrl id='field96379_{{test}}_browserbtn' tag='BUTTON' type='button' />

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