how to identify to new teb is open or not in puppeteer in Mycase SomeTime Form Button click Event to Some Time Open New teb or someTime SameTeb to Redirect Next Form
i work on Step Wise Form submission (automate) in That FirstStep Fillform and Then Submit Button Click Event To SomeTime Open New Teb and SomeTime SameTeb to Redirect Next Form So How Can Manage This Problem Please give me Suggestion ( How i can Identify to open new Teb or Not )
If NewTeb is Open Then Error And SameTeb Open NextForm Then No Error
Here is Error Message
(node:32521) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read properties of null (reading 'click')
at <anonymous>:4:16
at ExecutionContext._evaluateInternal (/home/Documents/project/play/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ExecutionContext.evaluate (/home/Documents/project/play/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
at async webScraper.runScript (/home/webcodegenie/Documents/project/play/demoOne.js:244:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:32521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:32521) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.