Cannot click button of type "submit"
See original GitHub issueSteps to reproduce
Ubuntu 18.04 Puppeteer 2.0.0
- Puppeteer version: 2.0.0
- Platform / OS version: Ubuntu 18.04
- URLs (if applicable):
- Node.js version: 10.15.3
What steps will reproduce the problem?
I tried these combinations of code I gathered from this repo’s issues/stackoverflow/other various forums to “click” a button of type submit:
await page.$eval('button[type="submit"]', elem => elem.click());
await page.click('button[submit]');
await page.click('button[type=submit]', {waitUntil: 'domcontentloaded'});
await page.evaluate((selector) => document.querySelector(selector).click(), process.hcPlatform.selectors.signup.submit);
await page.evaluate((selector) => document.querySelector(selector).click(), 'button.sc-gisBJw gVJias btn btn-default');
await page.evaluate(() => document.querySelector('button[type="submit"]').scrollIntoView());
await page.click('button[type="submit"]');
await page.waitFor('button[type="submit"]');
await page.$eval('button[type="submit"]', elem => elem.click());
await page.click('button[type="submit"]', {waitUntil: 'domcontentloaded'});
await page.waitFor(3000);
await page.click('button[text="Sign Up"]')
await page.focus('button[type="submit"]' )
await page.keyboard.type('\n');
await page.$$eval('button[type="submit"]', button => {
button.click();
});
What is the expected result?
Submit the form
What happens instead?
Either the checkbox above the submit button is DESELECTED and the submit button is ignored, or the submit button is simply ignored, or “no node is found”.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:9
Top Results From Across the Web
Submit button doesn't work - Stack Overflow
You need to ensure you have the submit button within the form element and an appropriate action attribute on the form element is...
Read more >Cannot click the submit button on the form - Jotform
I think there is a problem on the current embedded iframe code because it is different from what jotofrm generates. I see it...
Read more >Unable to click on any buttons or submit application on several
a) Press “Windows Logo” + “W” keys from the keyboard. b) Type “Troubleshooting” in the search bar and press “Enter”. c) ...
Read more ><input type="submit"> - HTML: HyperText Markup Language
<input> elements of type submit are rendered as buttons. When the click event occurs (typically because the user clicked the button), ...
Read more >Button Type In HTML: Here's Why You Should Always Declare ...
Click me for no reason! ... Reset the form! Submit (disabled). Button Types. There are three types of buttons: submit ...
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
Got the same problem. Just in my case, I’ve also tried to use this code:
We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!