-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_modal.py
More file actions
29 lines (23 loc) · 996 Bytes
/
Copy pathdebug_modal.py
File metadata and controls
29 lines (23 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import asyncio
from playwright.async_api import async_playwright
import logging
logging.basicConfig(level=logging.INFO)
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=True, args=['--no-sandbox'])
context = await browser.new_context(viewport={'width': 1280, 'height': 720})
page = await context.new_page()
await page.goto('https://hub.aeredium.io/community', timeout=60000)
await asyncio.sleep(10)
btn = page.get_by_text('Connect Wallet').first
await btn.click(force=True)
await asyncio.sleep(5)
btns = await page.locator('button').all()
for b in btns:
try:
text = await b.text_content()
html = await b.evaluate('el => el.outerHTML')
logging.info(f'BUTTON TEXT: {text.strip()} | HTML: {html}')
except: pass
await browser.close()
asyncio.run(main())