mirror of
https://github.com/nextcloud/docker.git
synced 2025-03-17 11:55:08 +01:00
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
from playwright.sync_api import sync_playwright
|
|
from time import time
|
|
|
|
def main():
|
|
with sync_playwright() as playwright:
|
|
browser_type = playwright.chromium
|
|
browser = browser_type.launch(
|
|
headless=False,
|
|
args=["--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage"]
|
|
)
|
|
page = browser.new_page()
|
|
page.goto('http://localhost:8080/')
|
|
page.set_default_timeout(120_000)
|
|
|
|
# 1. Create User
|
|
page.type('#adminlogin', 'Crash')
|
|
page.type('#adminpass', 'Override')
|
|
page.click('.primary')
|
|
print(time(), "Create user clicked")
|
|
|
|
# 2. Install all Apps
|
|
install_selector = '.button-vue--vue-primary'
|
|
page.wait_for_selector(install_selector)
|
|
page.click(install_selector)
|
|
print(time(), "Install apps clicked")
|
|
|
|
# 3. Dashboard
|
|
page.wait_for_selector('.app-dashboard')
|
|
print(time(), "Dashboard found")
|
|
page.get_by_role("button", name="Close modal").click()
|
|
|
|
browser.close()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|