I am trying to click on an input element through Puppeteer after going to the URL I requested I input a quantity by using
await page.type('#bidamount_temp', bidAmount);
Puppeteer is not complaining about this error: However after inputting a value into the field; i want the puppeteer to click on this button:
<input type="submit" value="Place Bid " class="buttonspb" style="font-size:15px; margin-top:-2px;" onclick="return url_check();">
So I use this in my node.js code:
await Promise.all([
page.click('input[value="Place Bid "]'),
page.waitForNavigation({ waitUntil: 'networkidle0' }),
]);
However it is giving me an error of :
Error: Error: No node found for selector: input[value="Place Bid"]
You can see in the error message that it strips the space from button value: you have "Place Bid ", puppeteer converts it into "Place Bid". You should use another selector to access the button, for example input[type="submit"].buttonspb