From 41d905b84cf97f6b2177a1fd099a5e9da1246f94 Mon Sep 17 00:00:00 2001 From: "Baruch Odem (Rothkoff)" Date: Tue, 30 Jan 2024 08:23:54 +0200 Subject: [PATCH] use $ instead of $$[0] --- src/scrapers/mizrahi.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scrapers/mizrahi.ts b/src/scrapers/mizrahi.ts index 8961c7cd..7bc182a0 100644 --- a/src/scrapers/mizrahi.ts +++ b/src/scrapers/mizrahi.ts @@ -211,9 +211,9 @@ class MizrahiScraper extends BaseScraperWithBrowser await waitUntilElementFound(this.page, `a[href*="${TRANSACTIONS_PAGE}"]`); await this.page.$eval(`a[href*="${TRANSACTIONS_PAGE}"]`, (el) => (el as HTMLElement).click()); - const accountNumberElement = (await this.page.$$('#AccountPicker'))[0]; - const accountNumberHandle = await accountNumberElement.getProperty('title'); - const accountNumber = ((await accountNumberHandle.jsonValue()) as string); + const accountNumberElement = await this.page.$('#dropdownBasic b'); + const accountNumberHandle = await accountNumberElement?.getProperty('title'); + const accountNumber = ((await accountNumberHandle?.jsonValue()) as string); const response = await Promise.any(TRANSACTIONS_REQUEST_URLS.map(async (url) => { const request = await this.page.waitForRequest(url);