On Monday, March 14, 2016 at 4:35:22 PM UTC-7, Damien Wood wrote:
>
> Hi, 
>
> I have an Angular front end and I am using Watir to test.
>
> One of the text fields 'First Name' has a max character length of 32. 
>
> When I try entering something with 33 characters manually, as you would 
> expect, it gets to 32 then stops me entering anything more. 
>
> However, if I use Watir to enter the text I can send it as many as I like. 
> It seems to totally ignore the maximum length of the field.
>
> On a related note I can also enter special characters, for example '!' in 
> the field which I cannot do manually using the keyboard. 
>
> Anyone come across anything like this?
>
> Cheers,
> Damo
>

A lot depends on the code driving your page and how such validations are 
done.  For a standard HTML input element that is controlling the input size 
with the maxlength attribute I would expect it to work.  OTOH, if you are 
using a custom control, with custom validation code then `.set` may not be 
firing the browser events that would trigger the validation.   In that case 
you might try using `.send_keys`instead as it more closely simulates a user 
actually typing at the keyboard, and see if that works better in this 
instance.

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to