Skip to content

Commit

Permalink
Update scrape-img-qr.ts (#218)
Browse files Browse the repository at this point in the history
chore: Fixed click to reload qr code, Update scrape-img-qr.ts
  • Loading branch information
AlanMartines authored May 24, 2021
1 parent d426d3f commit a2104e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/api/helpers/scrape-img-qr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ export async function scrapeImg(page: Page): Promise<ScrapQrcode | undefined> {
.evaluate(() => {
const selectorImg = document.querySelector('canvas');
const selectorUrl = selectorImg.closest('[data-ref]');
const buttonReload = selectorUrl.querySelector(
'[role="button"]'
) as HTMLButtonElement;
//const buttonReload = selectorUrl.querySelector('[role="button"]') as HTMLButtonElement;
const buttonReload = selectorUrl.querySelector('button');
if (buttonReload != null) {
buttonReload.click();
return true;
Expand Down

0 comments on commit a2104e4

Please sign in to comment.