Skip to content

Conversation

@chrisbrainerd
Copy link
Contributor

@chrisbrainerd chrisbrainerd commented Jun 15, 2017

Currently the Nightmare helper exposes electron's sendInputEvent, but only for key presses. This PR passes sendInputEvent through to the Nightmare helper so that in tests you can trigger mouse events (move, drag, mousedown, etc) at specific x/y coordinates, like so:
I.triggerMouseEvent({ type: "mouseDown", x: 100, y: 100, button: "left" }); I.triggerMouseEvent({ type: "mouseMove", x: 200, y: 200, button: "left" }); I.triggerMouseEvent({ type: "mouseUp", x: 200, y: 200, button: "left" });

@chrisbrainerd
Copy link
Contributor Author

Travis-ci test failed on Error: Sauce Labs Authentication Error. - any maintainers have knowledge of what that is / how to fix?

'selectOption': 'выбираю_опцию',
'fillField': 'заполнаю_поле',
'pressKey': 'нажимаю_кнопку',
'triggerMouseEvent': 'триггерное_событие_мыши',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, with all the translations! 🥇

@DavertMik
Copy link
Contributor

Thanks!

@DavertMik DavertMik merged commit aa475ff into codeceptjs:master Jun 20, 2017
@chrisbrainerd chrisbrainerd deleted the nightmare-mouse-events branch June 22, 2017 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants