workspace working

This commit is contained in:
2026-01-12 22:31:11 +08:00
parent 2738a822d1
commit 370fe6368a
149 changed files with 4648 additions and 660 deletions

29
inspect_ui2.py Normal file
View File

@@ -0,0 +1,29 @@
import requests
from bs4 import BeautifulSoup
url = 'http://localhost:3015'
resp = requests.get(url)
print('Status:', resp.status_code)
if resp.status_code == 200:
soup = BeautifulSoup(resp.text, 'html.parser')
# Find all elements with class
for tag in soup.find_all(True):
classes = tag.get('class')
if classes:
for cls in classes:
if 'select' in cls.lower():
print(tag.name, classes, tag.get('id'), tag.text[:30])
# Also find button with role="combobox"
for tag in soup.find_all(role='combobox'):
print('Combobox:', tag.name, tag.get('class'), tag.get('id'))
# Find any element with aria-label containing workspace
for tag in soup.find_all(attrs={'aria-label': True}):
if 'workspace' in tag['aria-label'].lower():
print('Aria-label workspace:', tag.name, tag.get('class'), tag.get('id'))
# Find any element with data-testid
for tag in soup.find_all(attrs={'data-testid': True}):
print('data-testid:', tag['data-testid'], tag.name, tag.get('class'))
# Print first 2000 chars of body
body = soup.find('body')
if body:
print('Body text snippet:', body.get_text()[:500])