You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the itauscraper script results in a failure at the login step. Puppeteer is unable to locate the selector #agencia, throwing an Error: No node found for selector: #agencia.
Environment:
Node.js version: v18.17.1
Project version: v1.4.2
Steps to Reproduce:
Clone the repository and navigate to the project directory.
Install dependencies via npm install or yarn install.
Run the script
Observe the error:
/home/deck/Projects/itauscraper/node_modules/puppeteer/lib/cjs/puppeteer/common/assert.js:26
throw new Error(message);
^
Error: No node found for selector: #agencia
at assert (/home/deck/Projects/itauscraper/node_modules/puppeteer/lib/cjs/puppeteer/common/assert.js:26:15)
at DOMWorld.type (/home/deck/Projects/itauscraper/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:315:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async stepLogin (/home/deck/Projects/itauscraper/itauscraper.js:16:3)
at async scraper (/home/deck/Projects/itauscraper/itauscraper.js:199:3)
Additional information
Running on non-headless mode, it works as expected. This might be due to Itaú checking for automated tools like Pupeteer, and it seems an user-agent can be used to fix this error.
The text was updated successfully, but these errors were encountered:
gruberdev
changed the title
Puppeteer fails to find selector on headless mode
[Bug] Puppeteer fails to find selector on headless mode
Sep 29, 2023
Running the itauscraper script results in a failure at the login step. Puppeteer is unable to locate the selector #agencia, throwing an Error: No node found for selector: #agencia.
Environment:
v18.17.1
v1.4.2
Steps to Reproduce:
Observe the error:
Additional information
The text was updated successfully, but these errors were encountered: