chase: Improve navigation robustness
Chase likes to subtly change their website fairly regularly, usually by introducing more ads or changing the location of existing widgets.
This commit is contained in:
15
xactfetch.py
15
xactfetch.py
@@ -579,14 +579,19 @@ class Chase:
|
||||
) -> Path:
|
||||
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
||||
fmt = '%m/%d/%Y'
|
||||
self.page.get_by_role(
|
||||
self.page.locator('#CARD_ACCOUNTS').get_by_role(
|
||||
'button', name='CREDIT CARD (...2467)'
|
||||
).first.click()
|
||||
self.page.get_by_role(
|
||||
'button', name='Download Account Activity'
|
||||
).click()
|
||||
fl = self.page.locator('#flyout')
|
||||
fl.wait_for()
|
||||
fl.get_by_role('button', name='Pay card', exact=True).wait_for()
|
||||
fl.get_by_role(
|
||||
'button', name='Account activity', exact=True
|
||||
).wait_for()
|
||||
fl.get_by_role('link', name='Show details').wait_for()
|
||||
fl.get_by_role('button', name='Download Account Activity').click()
|
||||
log.debug('Filling account activity download form')
|
||||
self.page.get_by_text('Activity', exact=True).click()
|
||||
self.page.locator('#select-downloadActivityOptionId-label').click()
|
||||
self.page.get_by_text('Choose a date range').nth(1).locator(
|
||||
'../..'
|
||||
).click()
|
||||
|
||||
Reference in New Issue
Block a user