Hey! Please tell me how realistic it is to implement:
- Puppeteer opens a browser.
- Puppeteer navigate to page
- Puppeteer is waiting for the page to load.
- A GET request is made to my server to get Login: Password
- The login: password is parsed from the response from my server.
- Puppeteer enters login into the form
- Puppeteer enters the password into the form
- Puppeteer Wait for Response
- Puppeteer waited for a response from the site.
And here is the most important thing. I need to do this:
If the response contains “InvalidCredentials” then a jump to #GOOD occurs
After the jump, the data is written to the GOOD.TXT text document. After writing to the file, we jump to step 4. (4. A GET request is made to my server to get Login: Password) and so everything is cyclical.
Of course there are other answers, but everything is the same there, if the answer is “Success” then a jump to #BAD occurs, the data is written to the file and the jump to step 2 is performed. (2. Puppeteer navigate to the page)
I understand perfectly well that all this will not be written to the results table hits, bad, error, but this is the only way to speed up the work and not load the page every time.