Skip to content

Commit

Permalink
Add credentials environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayima Okeeva committed Dec 3, 2024
1 parent 9b36bee commit c202a08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/selenium-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
- name: Run Selenium tests
env:
SELENIUM_REMOTE_URL: http://localhost:4444/wd/hub
OBI_USERNAME: ${{ secrets.OBI_USERNAME }}
OBI_PASSWORD: ${{ secrets.OBI_PASSWORD }}
BROWSER_NAME: firefox
run: |
pytest tests/test_login.py -sv --headless
6 changes: 6 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ def navigate_to_login(setup):
browser, wait = setup
login_page = LoginPage(browser, wait)

username = os.environ.get("USERNAME")
password = os.environ.get("PASSWORD")

if not username or not password:
raise ValueError("Missing USERNAME or PASSWORD environment variables.")

target_URL = login_page.navigate_to_homepage()
browser.execute_script("window.stop();")
print(f"conftest.py fixture - Navigated to: {target_URL}")
Expand Down

0 comments on commit c202a08

Please sign in to comment.