- From: John Jansen <John.Jansen@microsoft.com>
- Date: Thu, 10 Apr 2014 19:57:31 +0000
- To: "public-browser-tools-testing@w3.org" <public-browser-tools-testing@w3.org>
Hello everyone, I've been going through the touch section of the WebDriver spec[1] and have some concerns and suggestions. I believe the spec is being too limited in the overall approach to lowlevel inputs and we should take a step back, making the entire input mechanism much more generic. In my experimentation, I believe it makes logical sense to create a single object called "PointerAction()" (or similar) that takes in the type of pointer as a string argument. PointerAction() would then allow users to interact with the page using a set of well understood commands: For example: ptr = new PointerAction("touch"); ptr.down() ptr.moveTo() ptr.up() ptr.cancel() ptr.wait() // probably also need something like setAttribute() for cases where other properties from the input device matter, such as pressure, tilt, width or height [2] prt.setAttribute(name, val) By making the object generic, it could be easily expanded to include Mouse, Pen, Kinect, or ??? that comes along in the future. It also makes expectations super clear: "when I click with my mouse and wait for 1000ms, the following thing should occur with my browser under test..." -John [1] https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#user-input [2] https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html#pointerevent-interface
Received on Thursday, 10 April 2014 19:58:05 UTC