This commit is contained in:
TheNetsky
2023-10-02 11:52:12 +02:00
parent 8fef05a2b7
commit e8cb195f54
17 changed files with 341 additions and 149 deletions

View File

@@ -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