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.master
parent
d1c947c549
commit
5ea5d09b30
15
xactfetch.py
15
xactfetch.py
|
@ -579,14 +579,19 @@ class Chase:
|
||||||
) -> Path:
|
) -> Path:
|
||||||
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
||||||
fmt = '%m/%d/%Y'
|
fmt = '%m/%d/%Y'
|
||||||
self.page.get_by_role(
|
self.page.locator('#CARD_ACCOUNTS').get_by_role(
|
||||||
'button', name='CREDIT CARD (...2467)'
|
'button', name='CREDIT CARD (...2467)'
|
||||||
).first.click()
|
).first.click()
|
||||||
self.page.get_by_role(
|
fl = self.page.locator('#flyout')
|
||||||
'button', name='Download Account Activity'
|
fl.wait_for()
|
||||||
).click()
|
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')
|
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(
|
self.page.get_by_text('Choose a date range').nth(1).locator(
|
||||||
'../..'
|
'../..'
|
||||||
).click()
|
).click()
|
||||||
|
|
Loading…
Reference in New Issue