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.
Trouble using _setValue() on an HTML5 textbox that utilizes validation
Hi,
I've tried inserting text into a textbox on my HTML5 login page but it isn't working. The controller finds the element okay and when the script is played back it even logs the case as a success, but the text is not being populated.
Here is the source for the textbox:
<input id="Username" class="standard defaultfocus input-validation-error" type="text" value="" name="Username" maxlength="100" data-val-required="Please enter a valid Email Address" data-val-regex-pattern="^[a-zA-Z0-9]+(\.{0,1}[a-zA-Z0-9_%+-]+)*\@[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+$" data-val-regex="Please enter a valid Email Address" data-val="true"></input>
Here is the Sahi script:
_setValue(_textbox("Username"), "email@email.com");
Any idea how to get Sahi to fill in this texbox?
Thanks.
I've tried inserting text into a textbox on my HTML5 login page but it isn't working. The controller finds the element okay and when the script is played back it even logs the case as a success, but the text is not being populated.
Here is the source for the textbox:
<input id="Username" class="standard defaultfocus input-validation-error" type="text" value="" name="Username" maxlength="100" data-val-required="Please enter a valid Email Address" data-val-regex-pattern="^[a-zA-Z0-9]+(\.{0,1}[a-zA-Z0-9_%+-]+)*\@[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+$" data-val-regex="Please enter a valid Email Address" data-val="true"></input>
Here is the Sahi script:
_setValue(_textbox("Username"), "email@email.com");
Any idea how to get Sahi to fill in this texbox?
Thanks.
Best Answer
-
Hi,
Please have a look at below link.
http://sahi.co.in/forums/discussion/4790/solution-to-run-the-script-on-firefiox-20-#Item_1
Hope this will work
It is for firefox.
Regards,
Pratik Shah

Answers