Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatically "Tap" element from the console #116

Open
edwilliams opened this issue Oct 2, 2017 · 1 comment
Open

Programmatically "Tap" element from the console #116

edwilliams opened this issue Oct 2, 2017 · 1 comment

Comments

@edwilliams
Copy link

Is it possible to simulate a "Tap" from the console?

If an element is given a synthetic onClick event in React, the element itself can be identified in the DOM from the console in DevTools and a 'click' event simulated. For example (using jQuery for ease of demonstration)

$('[data-qa="some-element"]').click()

Is an equivalent event possible form the console?

@aalibasic
Copy link

Try doing a mouse down then a mouse up event on the element.

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

No branches or pull requests

2 participants