Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit a589ad0

Browse files
Merge pull request #733 from python-eel/update-workflow-branch
Update workflow branch
2 parents 7e88610 + b01e6f9 commit a589ad0

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
77
# The branches below must be a subset of the branches above
8-
branches: [master]
8+
branches: [main]
99
schedule:
1010
- cron: '0 11 * * 0'
1111

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test Eel
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
pull_request:
77

88
jobs:
@@ -14,6 +14,9 @@ jobs:
1414
matrix:
1515
os: [ubuntu-20.04, windows-latest, macos-latest]
1616
python-version: [3.7, 3.8, 3.9, "3.10"]
17+
exclude:
18+
- os: macos-latest
19+
python-version: 3.7
1720

1821
steps:
1922
- name: Checkout repository

.python-version

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
3.7.14
2-
3.8.14
3-
3.9.13
4-
3.10.8
1+
3.10

requirements-test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
psutil==5.9.2
44
pytest==7.0.1
55
pytest-timeout==2.1.0
6-
selenium==3.141.0
7-
webdriver_manager==3.7.1
6+
selenium>=4.0.0,<5.0.0
7+
webdriver_manager>=4.0.0,<5.0.0
88
mypy==0.971
99
pyinstaller==4.10
1010
types-setuptools==67.2.0.1

tests/conftest.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66
from selenium import webdriver
7-
from selenium.webdriver import DesiredCapabilities
7+
from selenium.webdriver.chrome.service import Service as ChromeService
88
from webdriver_manager.chrome import ChromeDriverManager
99

1010

@@ -14,18 +14,15 @@ def driver():
1414

1515
if TEST_BROWSER == "chrome":
1616
options = webdriver.ChromeOptions()
17-
options.headless = True
18-
capabilities = DesiredCapabilities.CHROME
19-
capabilities["goog:loggingPrefs"] = {"browser": "ALL"}
17+
options.add_argument('--headless=new')
18+
options.set_capability("goog:loggingPrefs", {"browser": "ALL"})
2019

2120
if platform.system() == "Windows":
2221
options.binary_location = "C:/Program Files/Google/Chrome/Application/chrome.exe"
2322

2423
driver = webdriver.Chrome(
25-
ChromeDriverManager().install(),
24+
service=ChromeService(ChromeDriverManager().install()),
2625
options=options,
27-
desired_capabilities=capabilities,
28-
service_log_path=os.path.devnull,
2926
)
3027

3128
# Firefox doesn't currently supported pulling JavaScript console logs, which we currently scan to affirm that

tests/integration/test_examples.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ def test_04_file_access(driver: webdriver.Remote):
4646
assert driver.title == "Eel Demo"
4747

4848
with TemporaryDirectory() as temp_dir, NamedTemporaryFile(dir=temp_dir) as temp_file:
49-
driver.find_element_by_id('input-box').clear()
50-
driver.find_element_by_id('input-box').send_keys(temp_dir)
49+
driver.find_element(value='input-box').clear()
50+
driver.find_element(value='input-box').send_keys(temp_dir)
5151
time.sleep(0.5)
52-
driver.find_element_by_css_selector('button').click()
52+
driver.find_element(By.CSS_SELECTOR, 'button').click()
5353

54-
assert driver.find_element_by_id('file-name').text == os.path.basename(temp_file.name)
54+
assert driver.find_element(value='file-name').text == os.path.basename(temp_file.name)
5555

5656

5757
def test_06_jinja_templates(driver: webdriver.Remote):
5858
with get_eel_server('examples/06 - jinja_templates/hello.py', 'templates/hello.html') as eel_url:
5959
driver.get(eel_url)
6060
assert driver.title == "Hello, World!"
6161

62-
driver.find_element_by_css_selector('a').click()
62+
driver.find_element(By.CSS_SELECTOR, 'a').click()
6363
WebDriverWait(driver, 2.0).until(expected_conditions.presence_of_element_located((By.XPATH, '//h1[text()="This is page 2"]')))
6464

6565

0 commit comments

Comments
 (0)