I am trying to create a bot that inserts rows into a grid on a Web page and populates two of the columns within each newly inserted row. Since different users of this bot may have the columns in different order, I am storing the column numbers as variables (i.e. AccountColnum and SubaccountColnum). Hence, I am creating the selectors dynamically using the String variables account_selector and subaccount_selector respectively, and using the Type Into activity to populate those columns.
The problem is that when I run the bot, it skips the first field (i.e. account) and goes straight to the second field (i.e. subaccount).
To debug this, I tried inserting an extra static Type Into activity for account, right before the dynamic one. The results were as expected: it populated the Account field twice. (i.e. In other words, the dynamic version of the Type Into activity worked, provided I executed a static version of the same Type Into activity immediately beforehand.) So the dynamic selector appears to be correct. Moreover, the other dynamic selector (i.e. for subaccount) is identical to the Account one, aside from the column number being different, and there is no problem executing it.
I tried various things like (1) inserting delays before the first Type Into activity, (2) Inserting a Set Focus activity on the Account column right before the Type Into, etc. but to no avail.
In case it helps, another thing I noticed is that I am able to highlight the Account field in UI Explorer (using the hard-coded version of my text), but I am not able to highlight the field in Edit Selector within my Type Into activity. So there seems to be a disconnect between UI Explorer and the Edit Selector of the activity.
Attached are teh dynamic selectors which I have been trying to use, plus the static version which I used for debugging.
Again, the 2nd dynamic one always works, but the 1st one require some coaxing before it works (i.e. by first executing a static version of the same Type Into activity).
Dynamic Selectors.docx (11.6 KB)
Notice in the static version I have replaced the variable AccountColnum with ‘1’, and also I replaced the lengthy “id” tag with tableRow=‘1’ (i.e. for adding new rows on top).