I'm trying to make a script with Puppeteer and Node js that post an advert on a website (like ebay or gumtree) from text files and image on my PC
I already done all the stuff with login, fill the form and upload images, but I can't do any stuff after submitting the form (I have to check a box and click validate)
The error log say that No node was found for selectors newadSubmit, accept_rule and lbc_submit
var promise1 = new Promise(function(resolve, reject) {
setTimeout(function() {
upload(getInfo(absolutePath, "#titre"), workingPath + "1.jpg",
workingPath + "2.jpg",
workingPath + "3.jpg",
getInfo(absolutePath, "#prix"),
getInfo(absolutePath, "#desc"),
getInfo(absolutePath, "#cp"),
1,
getInfo(absolutePath, "#num"));
}, 300);});
promise1.then(function(value) {
page.click('#newadSubmit');
page.waitForSelector('#accept_rule');
page.click('#accept_rule');
page.click('#lbc_submit');});
In addition, the error appear even before the upload() function finish