Increment index in a selector

I want to increment a selectors index for an automation practise. This so the automation dont write information in the same cells everytime. Do anyone have a idea how i can do this? Attach the selector code:

<wnd app='expenseitdemo - postnord.exe' cls='HwndWrapper*' title='Create Expense Report' /> <ctrl idx='16' role='editable text' />

Hello.

You need to insert a variable inside the selector. For instance in this case:

wnd app=‘expenseitdemo - postnord.exe’ cls=‘HwndWrapper*’ title=‘Create Expense Report’ />
ctrl idx=‘“+[Increment name]+”’ role=‘editable text’ /

Selectors are just string variables so you can format them in many ways.

Ok, i tried and got this message:

Main has thrown an exception

Message: Cannot find the UI element corresponding to this selector:

<wnd app='expenseitdemo - postnord.exe' cls='HwndWrapper*' title='Create Expense Report' /><ctrl idx='&quot;+ [incrementID] +&quot;' role='editable text' />

Source: Type into ‘editable text’

Exception Type: SelectorNotFoundException

I did an assign activity (string), incrementID → “16”

You will need to change the selector and instead of [incrementID] insert a variable. I have attached a workflow as an example. Let me know if you still encounter issues.

IncrementTypeDemo.xaml (6.6 KB)

2 Likes

Still not get it. Attach my file:

Main.xaml (13.0 KB)

(The * was just a chance)

Where have i done something wrong?

1 Like

Hey @SoJo

For your reference: SampleIncrement.zip (109.8 KB)

Regards…!!
Aksh

1 Like

This is not working for selector of “Get Visible text”.

Any suggestions are most welcome.
I am trying to increment idx value to check for number of rows in pdf data table and extracting rows one by one until the final value in loop.
@Cosmin_Ion_Nicolae @aksh1yadav