Hi,
I have a web application where I am using a jQuery plugin named inputmask ( https://github.com/RobinHerbots/jquery.inputmask ). I works great on IE, but when I run a test WatiN clears the mask and write just a raw value.
I have upload a sample project that contains a page named MaskAndWatiNProblem.html with an INPUT and a inputmask. When you run the console application, it uses WatiN to test it. But when WatiN type on the input, the mask disappears, so it cannot be tested properly.
You can download the project from here vtortola.net/files/jQueryInputMaskAndWatiN.zip
The input has the mask \"dd/mm/yyyy\", so when you introduce \"01022000\" it should be formatted to \"01/02/2000\", and when you read the value from the input should be also \"01/02/2000\".
Any idea about why WatiN disables this plugin?
Thanks.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I did some further testing and in the keydown keypress event the args e.which || e.charCode || e.keyCode always return 0, ... I also tried with some patching in de watin code.
in IEFireEventHandler
private string CreateJavaScriptFireEventCode(NameValueCollection eventObjectProperties, string eventName)
{
var scriptCode = new StringBuilder();
var window = _ieElement.ParentWindow;
if (IE.GetMajorIEVersion() > 8 && eventName.ToLower().Contains("key"))
{
scriptCode.Append("var newEvt = document.createEvent('KeyboardEvent');");