Skip to content

Conversation

@theido
Copy link

@theido theido commented Sep 26, 2025

🐛 Issue

Fixes #969 - Bank Leumi modal on login that prevents scraper from proceeding

📝 Description

Bank Leumi introduced a new modal that appears after login with button ID f3ac5286-8b3d-1bff-cca8-105a2e34e114. This modal blocks the scraper from proceeding to account selection, causing timeouts and failures.

🔧 Changes Made

  • Added modal detection and dismissal in waitForPostLogin function
  • Waits 2 seconds for modal to appear, then automatically clicks dismiss button
  • Added comprehensive error handling and debug logging
  • Fully backward compatible - works whether modal appears or not

✅ Testing

  • Tested with real Bank Leumi credentials
  • Modal is automatically detected and dismissed
  • Login process completes successfully
  • Account data is retrieved correctly
  • No manual intervention required

🎯 Benefits

  • Fixes login failures: Resolves the timeout issue caused by the modal
  • Fully automated: No manual intervention required
  • Robust: Handles cases where modal doesn't appear
  • Debuggable: Comprehensive logging for troubleshooting
  • Non-breaking: Doesn't affect existing functionality

- Add modal detection and dismissal for button ID f3ac5286-8b3d-1bff-cca8-105a2e34e114
- Wait 2 seconds for modal to appear before attempting to click
- Add comprehensive error handling and debug logging
- Fixes issue where scraper would get stuck on login modal
- Resolves eshaham#969
await new Promise(resolve => setTimeout(resolve, 2000));

// Try to find and click the modal button
const modalButton = await page.waitForSelector('#f3ac5286-8b3d-1bff-cca8-105a2e34e114', { timeout: 5000 });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have waitUntilElementFound and clickButton in helpers\elements-interactions.ts. can you see if they work for your case?

// Handle the new modal that appears after login
debug('Checking for login modal...');

try {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considre adding the logic as waitForModalToClose (or any other name) then here await waitForModalToClose()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bank Leumi - modal on login

3 participants