18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
One more about regexp..
Sorry, still cannot make this regular expressions thing working, though read several topics about that.
I have a field with name like content[4925][_title] and this number is always changing. How can i make my scripts working with it?
I use such code to verify and fill this field:
I have a field with name like content[4925][_title] and this number is always changing. How can i make my scripts working with it?
I use such code to verify and fill this field:
$addWritingTitleField = "content[][_title]";
....
_assertEqual($title, _textbox($addWritingTitleField).value);
_setValue(_textbox($addWritingTitleField), "");
This discussion has been closed.
Comments
. (a dot) means any character/number
* means any number of times
[ and ] have special meaning too.
In your case you should be able to use
$addWritingTitleField = /content\[.*\]\[_title\]/;
Since [ and ] have special meaning, they have to be escaped using a backslash. The .* will replace any numbers between the first square brackets.
Hope that helps.
Regards,
Narayan