diff --git a/xactfetch.py b/xactfetch.py index 824ea89..ec32b7d 100644 --- a/xactfetch.py +++ b/xactfetch.py @@ -551,15 +551,14 @@ class Chase: log.debug('Waiting for page to load completely') self.page.get_by_role('link', name='Sort Options').wait_for() self.page.wait_for_timeout(random.randint(1500, 2500)) - s = self.page.locator('#downloadActivityIcon') - s.wait_for() - self.page.wait_for_timeout(random.randint(1500, 2500)) - log.debug('Clicking "Download account activity" button') - s.click() + href = '#/dashboard/accountDetails/downloadAccountTransactions/index' + self.page.evaluate(f'window.location.href = "{href}";') log.debug('Waiting for page to load') s = self.page.locator('button#select-downloadActivityOptionId') s.wait_for() log.debug('Filling account activity download form') + self.page.locator('button#select-account-selector').click() + self.page.get_by_text('CREDIT CARD').nth(1).locator('../..').click() s.click() self.page.get_by_text('Choose a date range').nth(1).locator( '../..' @@ -575,7 +574,7 @@ class Chase: ) self.page.locator('#accountActivityToDate-input-input').blur() self.page.wait_for_timeout(random.randint(500, 1500)) - with self.page.expect_download() as di: + with self.page.expect_download(timeout=5000) as di: self.page.get_by_role( 'button', name='Download', exact=True ).click()