chase: Fixes for site updates
Chase made some minor updates to their site recently which affected some of the element locators. The propaganda in the right-hand column of the landing page has changed, and the Downlod Account Activity form is still really terrible, and now behaves even more strangely.master
parent
9831fa818f
commit
d1c947c549
20
xactfetch.py
20
xactfetch.py
|
@ -568,8 +568,9 @@ class Chase:
|
|||
).click()
|
||||
log.debug('Waiting for page load')
|
||||
self.page.wait_for_load_state()
|
||||
self.page.get_by_text('Amazon Rewards points').wait_for(timeout=60000)
|
||||
self.page.get_by_role('button', name='Open an account').wait_for()
|
||||
self.page.get_by_role('button', name='Pay Card').wait_for(
|
||||
timeout=120000
|
||||
)
|
||||
log.info('Successfully logged in to Chase')
|
||||
self._logged_in = True
|
||||
|
||||
|
@ -578,15 +579,14 @@ class Chase:
|
|||
) -> Path:
|
||||
log.info('Downloading transactions from %s to %s', from_date, to_date)
|
||||
fmt = '%m/%d/%Y'
|
||||
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()
|
||||
self.page.get_by_role(
|
||||
'button', name='CREDIT CARD (...2467)'
|
||||
).first.click()
|
||||
self.page.get_by_role(
|
||||
'button', name='Download Account Activity'
|
||||
).click()
|
||||
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('Activity', exact=True).click()
|
||||
self.page.get_by_text('Choose a date range').nth(1).locator(
|
||||
'../..'
|
||||
).click()
|
||||
|
|
Loading…
Reference in New Issue