Hello Watij Team,
My name is Steven Harris (steven_harris@tjx.com).
I am attempting to use Watij for some testing on a web app that I am working on. I am having a problem.
It appears that the sendKeys() method sends extra keydown and keyup events which is causing my JavaScript to behave incorrectly.
I have created and attached a small HTML with a single input text field on it. When I enter the characters abc into the field I get the following output on the web page:
keyDown : 65
keyPress : 97
keyUp : 65
keyDown : 66
keyPress : 98
keyUp : 66
keyDown : 67
keyPress : 99
keyUp : 67
When I perform the exact same operation on the page using Watij sendKeys() method from the attached Groovy script I get the following output:
keyDown : 144
keyUp : 144
keyDown : 65
keyPress : 97
keyUp : 65
keyDown : 66
keyPress : 98
keyUp : 66
keyDown : 67
keyPress : 99
keyUp : 67
keyDown : 144
keyUp : 144
It seems that there extra keyDown and keyUp events being inserted at the start and end of the call to the sendKeys() method.
I looked at the source and naturally it is not Watij code that is putting in these extra events. I am wondering if it is a browser configuration issue or perhaps (gasp) a bug in some Microsoft code.
I am using Internet Explorer 7 version 7.0.5730.11 and Watij release 3.1.0.
Thanks for your help and your time in trying to fix this problem.
Steven Harris
Contains HTML and Groovy source