How do you click using page function?
See original GitHub issueI want to click this button
<button class="_qv64e">Sign up</button>
but the class is not unique. In the browser console I can select using this
document.querySelectorAll('._qv64e')[1])
can someone tell me how I can do something like this:
await page.click(document.querySelectorAll('._qv64e')[1]);
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
HTML Button onclick – JavaScript Click Event Tutorial
The onclick event executes a certain functionality when a button is clicked. This could be when a user submits a form, when you...
Read more >How can I run a JavaScript function with any click on the page?
Right now I'm using <body onload="function"> , which changes some text on the page based on which element is focused on.
Read more >onclick Event - W3Schools
The onclick event occurs when the user clicks on an HTML element. Mouse Events. Event, Occurs When. onclick, The user clicks on an...
Read more >HTMLElement.click() - Web APIs | MDN
The HTMLElement.click() method simulates a mouse click on an element. When click() is used with supported elements (such as an <input> ) ...
Read more >How to run a function with a button click in JavaScript
The first line of code here is using getElementById to go out and select the button and store it in the variable btn....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vsemozhetbyt - I believe you meant: (using querySelectorAll, and not querySelector)
One more option (pretty much the same):
Try: