summaryrefslogtreecommitdiff
path: root/tests/selenium/test.py
blob: 6280b58b815ec624228a4f5dd57af4f4108d7606 (plain)
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
#!/usr/bin/python3

import os
from selenium import webdriver

CI_COMMIT_SHORT_SHA = os.getenv("CI_COMMIT_SHORT_SHA")

if not CI_COMMIT_SHORT_SHA:
    print("CI_COMMIT_SHORT_SHA env var should be defined")
    exit(1)

options = webdriver.ChromeOptions()

driver = webdriver.Remote(
    command_executor='http://selenium-hub.selenium-grid.svc.cluster.local:4444/wd/hub',
	options=options
)

app_url = f"http://tt-rss-{CI_COMMIT_SHORT_SHA}-app.gitlab-fakecake.svc.cluster.local/tt-rss"

print(f"base url = {app_url}")

driver.get(app_url)
print(driver.page_source)
driver.quit()