Open Bug 1490268 Opened 6 years ago Updated 2 years ago

WebDriver:ElementClick to use action primitives

Categories

(Remote Protocol :: Marionette, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Blocks 4 open bugs)

Details

The WebDriver spec says that click has to use the action primitives for synthesizing the mouse events. Right now it's calling `event.synthesizeMouseAtPoint()` directly.
Blocks: 1456642
Blocks: 1394354
Blocks: 1405967
No longer blocks: 1394354

This task was majorly blocked by not having access to WebDriver actions in Chrome scope. With bug 1365886 this is available now.

Depends on: 1365886

Hi Henrik,

I was wondering what approach you were planning to use for this?

  • Were you thinking that click should call the action.dispatchTickAction with the three actions written as JSON, or
  • Do you think that actions should have a helper function to create the JSON?

I notice that the spec seems to have a bug in that elementClick, in the "Otherwise" section states:

Let click point be the element’s in-view center point.

But it never actually makes use of the click point, instead positioning at x: 0, y: 0, origin: element.

(In reply to Andrew Nicols from comment #2)

  • Were you thinking that click should call the action.dispatchTickAction with the three actions written as JSON, or
  • Do you think that actions should have a helper function to create the JSON?

Hi Andrew, sorry that the reply took a while but I was off for the Christmas days...

I haven't taken a look at the actions code for a while, but I did that now. My gut feeling would say that we should create instances of the existing classes in action.js. Each of those would then need a toJSON() method. With that in place the elementClick() method of the MarionetteCommandsChild class could then build-up the action chain, and force a JSON.stringify() on the whole chain.

I notice that the spec seems to have a bug in that elementClick, in the "Otherwise" section states:

Let click point be the element’s in-view center point.

But it never actually makes use of the click point, instead positioning at x: 0, y: 0, origin: element.

I have seen you already filed https://github.com/w3c/webdriver/issues/1563 for that. It should be discussed there, or a PR being opened first.

Is our implementation also affected by that? If yes, would you mind filing a separate bug for that? We should mark it blocking this specific implementation bug.

Severity: normal → S3
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.