The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)

20130910

sahi - regex how to specify an indeterminate row number for a textfield element in a table row column

i have a datatable that expands with a new row every time i click an "add new row" button, and only the new row will have an editable textfield input, so to generalize the sahi script code you can use a regex, so it will match whichever single row has a visible textfield input:
_setValue(_textbox(/detailForm:agrSCFactorsTable:\d{1}:SCF_nameIn/), $name);

\d{1} means a digit (number) with 1 in length, i.e. 0-9.

so that regex will match elements like:
_setValue(_textbox(/detailForm:agrSCFactorsTable:0:SCF_nameIn/), $name);
...
_setValue(_textbox(/detailForm:agrSCFactorsTable:3:SCF_nameIn/), $name);
...
_setValue(_textbox(/detailForm:agrSCFactorsTable:7:SCF_nameIn/), $name);
...


No comments:

Post a Comment