Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

254
Views
Puppeteer cannot write in a specific input field

I tried to write in the search field (input) with Puppeteer but the program ends without writing anything in that field. Here the code:

const browser = await puppeteer.launch({
    headless: false,
    slowMo: 100, // slow down by 250ms
});
const page = await browser.newPage();
await page.goto('https://cb01.tattoo/');
await page.waitForSelector('.form-control.mb-2.mr-sm-2.mb-sm-0');
console.log('passed');
await page.type('.form-control.mb-2.mr-sm-2.mb-sm-0', 'hello');
//await page.$eval('.form-control.mb-2.mr-sm-2.mb-sm-0', el => el.value = 'hello');
console.log('end');
//await browser.close();

I also tried with commented code but it doesn't work anyway. Ty for help.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The input element is inside hidden element. You need to unhide the parent element first:

const browser = await puppeteer.launch({
    headless: false,
    slowMo: 100, // slow down by 250ms
});
const page = await browser.newPage();
await page.goto('https://cb01.tattoo/');
await page.waitForSelector('.form-control.mb-2.mr-sm-2.mb-sm-0');
console.log('passed');

await page.$eval('.mobileShow', el => el.style.display = 'block'); // Unhide parent.

await page.type('.form-control.mb-2.mr-sm-2.mb-sm-0', 'hello');
console.log('end');
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!