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

View File

@@ -0,0 +1,38 @@
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(options=options)
driver.implicitly_wait(5)
try:
driver.get('http://localhost:3015')
time.sleep(3)
# Find combobox button
combobox = driver.find_element(By.CSS_SELECTOR, '[role="combobox"].w-48')
print('Combobox found')
# Click to open dropdown
combobox.click()
time.sleep(1)
# Find the dropdown container (maybe with role="listbox")
dropdowns = driver.find_elements(By.CSS_SELECTOR, '[role="listbox"]')
print(f'Number of listboxes: {len(dropdowns)}')
for d in dropdowns:
print('Listbox outer HTML:', d.get_attribute('outerHTML'))
# Also look for any div with class containing 'SelectContent' or 'PopoverContent'
popovers = driver.find_elements(By.CSS_SELECTOR, '[data-state="open"]')
print(f'Open popovers: {len(popovers)}')
for p in popovers:
print('Popover outer HTML:', p.get_attribute('outerHTML'))
# Take screenshot
driver.save_screenshot('dropdown_open.png')
except Exception as e:
print('Error:', e)
import traceback
traceback.print_exc()
finally:
driver.quit()