Skip to content

Commit

Permalink
Added driver installation via code
Browse files Browse the repository at this point in the history
  • Loading branch information
ritwik-g committed Jan 31, 2025
1 parent e63a2bf commit 9c7b9e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: latest
install-chromedriver: true
install-chromedriver: false

- name: Cache tox environments
uses: actions/cache@v4
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pytest-mock~=3.0
pytest-cov~=6.0
pytest-md-report~=0.6.0
selenium~=4.28
webdriver-manager~=4.0
4 changes: 3 additions & 1 deletion tests/e2e/test_login.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service as ChromeService
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from webdriver_manager.chrome import ChromeDriverManager


class TestLogin:
Expand All @@ -13,7 +15,7 @@ def setup_method(self, method):
options.add_argument("--window-size=1920,1080")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--no-sandbox")
self.driver = webdriver.Chrome(options=options)
self.driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options)

def teardown_method(self, method):
self.driver.quit()
Expand Down

0 comments on commit 9c7b9e9

Please sign in to comment.