mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-26 18:01:03 +00:00
1.0.5
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Page } from 'puppeteer'
|
||||
|
||||
import { wait } from './util/Utils'
|
||||
|
||||
export async function tryDismissAllMessages(page: Page): Promise<boolean> {
|
||||
@@ -15,7 +16,7 @@ export async function tryDismissAllMessages(page: Page): Promise<boolean> {
|
||||
|
||||
for (const button of buttons) {
|
||||
try {
|
||||
const element = await page.waitForSelector(button.selector, { timeout: 1000 })
|
||||
const element = await page.waitForSelector(button.selector, { visible: true, timeout: 1000 })
|
||||
if (element) {
|
||||
await element.click()
|
||||
result = true
|
||||
|
||||
Reference in New Issue
Block a user