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()
|
).click()
|
||||||
log.debug('Waiting for page load')
|
log.debug('Waiting for page load')
|
||||||
self.page.wait_for_load_state()
|
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='Pay Card').wait_for(
|
||||||
self.page.get_by_role('button', name='Open an account').wait_for()
|
timeout=120000
|
||||||
|
)
|
||||||
log.info('Successfully logged in to Chase')
|
log.info('Successfully logged in to Chase')
|
||||||
self._logged_in = True
|
self._logged_in = True
|
||||||
|
|
||||||
|
@ -578,15 +579,14 @@ 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'
|
||||||
href = '#/dashboard/accountDetails/downloadAccountTransactions/index'
|
self.page.get_by_role(
|
||||||
self.page.evaluate(f'window.location.href = "{href}";')
|
'button', name='CREDIT CARD (...2467)'
|
||||||
log.debug('Waiting for page to load')
|
).first.click()
|
||||||
s = self.page.locator('button#select-downloadActivityOptionId')
|
self.page.get_by_role(
|
||||||
s.wait_for()
|
'button', name='Download Account Activity'
|
||||||
|
).click()
|
||||||
log.debug('Filling account activity download form')
|
log.debug('Filling account activity download form')
|
||||||
self.page.locator('button#select-account-selector').click()
|
self.page.get_by_text('Activity', exact=True).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(
|
self.page.get_by_text('Choose a date range').nth(1).locator(
|
||||||
'../..'
|
'../..'
|
||||||
).click()
|
).click()
|
||||||
|
|
Loading…
Reference in New Issue