Skip to content

Commit 9eec8d3

Browse files
committed
Update conftest and Github Actions Workflow
1 parent c84193a commit 9eec8d3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/python-app.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
run: |
2525
python -m pip install --upgrade pip
2626
pip install -r requirements.txt
27+
28+
- name: Install Chrome browser
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y google-chrome-stable
2732
2833
- name: Run Tests
2934
run: |

conftest.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import pytest
2+
from selenium import webdriver
3+
from selenium.webdriver.chrome.service import Service
4+
from selenium.webdriver.chrome.options import Options
5+
from webdriver_manager.chrome import ChromeDriverManager
6+
7+
@pytest.fixture(scope="function")
8+
def driver():
9+
options = Options()
10+
options.add_argument("--start-maximized")
11+
options.add_argument("--no-sandbox")
12+
options.add_argument("--disable-dev-shm-usage")
13+
options.add_argument("--headless")
14+
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
15+
driver.implicitly_wait(10)
16+
yield driver
17+
driver.quit()

0 commit comments

Comments
 (0)