Skip to content

Commit 67d6626

Browse files
Safari/Firefox pipelines & all screenshots removed
1 parent d90a81f commit 67d6626

File tree

284 files changed

+75
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+75
-12
lines changed

.github/workflows/playwright_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
playwright-docker:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111

1212
strategy:
1313
fail-fast: false
@@ -43,6 +43,6 @@ jobs:
4343
run: |
4444
echo "HOME=/root" >> $GITHUB_ENV # Set HOME environment variable
4545
46-
- name: Run Playwright ${{ matrix.browser-name }} on py${{ matrix.python-version }} tests
46+
- name: Run Playwright ${{ matrix.browser-name }} tests with py${{ matrix.python-version }}
4747
run: |
4848
tox -e py${{ env.TOX_ENV }}-playwright-${{ matrix.browser-name }} -- --headless -v --sv
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Selenium Safari Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # Trigger on push to any branch
7+
8+
jobs:
9+
selenium-safari:
10+
runs-on: macos-13
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: [ "3.8", "3.12" ]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.8'
25+
26+
- name: Setup tests
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install tox==3.28.0
30+
31+
- name: Extract tox env
32+
run: |
33+
tox_env_variable=$(echo "${{ matrix.python-version }}" | sed 's/\.//g')
34+
echo "TOX_ENV=${tox_env_variable}" >> $GITHUB_ENV
35+
36+
- name: Run Selenium Safari tests with py${{ matrix.python-version }}
37+
run: |
38+
tox -e py${{ env.TOX_ENV }}-selenium-safari -- --headless -v --sv

.github/workflows/selenium_tests.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ on:
77

88
jobs:
99
selenium-selenoid:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
image: [ "selenoid/chrome:128.0", "selenoid/firefox:125.0"]
16+
python-version: [ "3.8", "3.12" ]
1117

1218
services:
1319
selenoid:
14-
image: selenoid/vnc:chrome_112.0
20+
image: ${{ matrix.image }}
1521
options: --privileged --memory=4g
1622
ports:
1723
- 4444:4444
@@ -29,7 +35,17 @@ jobs:
2935
run: |
3036
python -m pip install --upgrade pip
3137
pip install tox==3.28.0
38+
39+
- name: Extract tox env
40+
run: |
41+
tox_env_variable=$(echo "${{ matrix.python-version }}" | sed 's/\.//g')
42+
echo "TOX_ENV=${tox_env_variable}" >> $GITHUB_ENV
43+
44+
- name: Extract Browser Name
45+
run: |
46+
browser_name=$(echo "${{ matrix.image }}" | sed -E 's|.*/([^:]+):.*|\1|')
47+
echo "BROWSER=${browser_name}" >> $GITHUB_ENV
3248
33-
- name: Run Selenium tests
49+
- name: Run Selenium ${{ env.BROWSER }} tests with py${{ matrix.python-version }}
3450
run: |
35-
tox -e py38-selenium-chrome -- --env remote --headless -v --sv
51+
tox -e py${{ env.TOX_ENV }}-selenium-${{ env.BROWSER }} -- --env remote --headless -v

.github/workflows/static_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
static:
10-
runs-on: ubuntu-latest #'windows-latest' / 'macos-latest'
10+
runs-on: ubuntu-24.04
1111

1212
strategy:
1313
fail-fast: false
@@ -33,6 +33,6 @@ jobs:
3333
tox_env_variable=$(echo "${{ matrix.python-version }}" | sed 's/\.//g')
3434
echo "TOX_ENV=${tox_env_variable}" >> $GITHUB_ENV
3535
36-
- name: Run Tox on ${{ matrix.python-version }}
36+
- name: Run Static tests with ${{ matrix.python-version }}
3737
run: |
3838
tox -e py${{ env.TOX_ENV }}-static

tests/adata/drivers/selenium_driver.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,25 @@ class SeleniumDriver:
1515
@staticmethod
1616
def create_selenium_driver(entities: DriverEntities):
1717
driver_name = entities.driver_name
18+
options = None
19+
remote_url = "http://127.0.0.1:4444"
20+
1821
if driver_name == 'safari' and DriverWrapperSessions.is_connected():
1922
driver_name = 'chrome' # Cannot create second selenium driver
20-
23+
elif driver_name == 'chrome':
24+
options = entities.selenium_chrome_options
25+
elif driver_name == 'firefox':
26+
options = entities.selenium_firefox_options
27+
remote_url += '/wd/hub'
28+
else:
29+
raise Exception('Unknown driver: %s' % driver_name)
2130

2231
if entities.env == 'remote':
23-
driver = Remote(options=entities.selenium_chrome_options)
32+
driver = Remote(remote_url, options=options)
2433
elif driver_name == 'chrome':
25-
driver = ChromeWebDriver(options=entities.selenium_chrome_options, service=ChromeService())
34+
driver = ChromeWebDriver(options=options, service=ChromeService())
2635
elif driver_name == 'firefox':
27-
driver = GeckoWebDriver(options=entities.selenium_firefox_options, service=FirefoxService())
36+
driver = GeckoWebDriver(options=options, service=FirefoxService())
2837
elif driver_name == 'safari':
2938
driver = SafariWebDriver(service=SafariService())
3039
else:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-33.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)