fix(sync): await Untersuchungen form navigation to prevent Fahrgenehmigungen page abort

This commit is contained in:
Matthias Hochmeister
2026-04-19 19:33:51 +02:00
parent d796fae978
commit b401b75b9a

View File

@@ -984,8 +984,10 @@ async function scrapeMemberUntersuchungen(
await selectAlleAnzeige(frame);
const submitBtn = frame.locator('input[type="image"][src*="suchen"]');
if (await submitBtn.count() > 0) {
await submitBtn.click();
await frame.waitForLoadState('networkidle').catch(() => {});
await Promise.all([
frame.waitForNavigation({ waitUntil: 'networkidle', timeout: 15000 }).catch(() => {}),
submitBtn.click(),
]);
}
// Try to navigate to history/detail view if available