因此,我尝试使用puppeteer将值添加到简单输入框。问题在于它将截断第一个字母或前几个字母。据我了解,await page.waitFor
不会出现,直到该选择器在DOM上可见。
function test(){
(async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('https://sadfasdfasdf.com');
await page.click('#signup_forms_submit');
await page.waitFor('#signup_email');
await page.type('#signup_email','test@gmail.com',{delay: 120});
console.log('test');
})();
}