Fix pressSequentially -> type() and extend submit polling to ~15s
Playwright on AWS doesn't have pressSequentially, use type() instead. Extend submit polling from 4 to 6 iterations (~15s total) to handle slower reCAPTCHA verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,8 +154,8 @@ async function fillAndSubmit(page, job, formFiller, meta, opts) {
|
||||
// (invisible reCAPTCHA + server round-trip can take several seconds)
|
||||
const verifySelector = opts.verifySelector || 'form button[type="submit"]:not([disabled])';
|
||||
let postSubmit = { hasSuccess: false, hasForm: true, validationErrors: [] };
|
||||
for (let wait = 0; wait < 4; wait++) {
|
||||
await page.waitForTimeout(wait === 0 ? SUBMIT_WAIT : 2000);
|
||||
for (let wait = 0; wait < 6; wait++) {
|
||||
await page.waitForTimeout(wait === 0 ? SUBMIT_WAIT : 2500);
|
||||
postSubmit = await page.evaluate((vs) => {
|
||||
const text = (document.body.innerText || '').toLowerCase();
|
||||
const errorEls = document.querySelectorAll('[class*="error"], [class*="invalid"], [role="alert"]');
|
||||
|
||||
Reference in New Issue
Block a user