18 January 2026:


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

kyoobkyoob Members
edited April 2013 in Sahi Pro
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.

Best Answer

Answers

Sign In or Register to comment.