Skip to content

Commit 54584bc

Browse files
authored
Merge branch 'master' into feature/drag-and-drop-to-frame
2 parents 4de91cb + e495938 commit 54584bc

101 files changed

Lines changed: 1082 additions & 988 deletions

File tree

Some content is hidden

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

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.approved.txt text eol=lf

.github/workflows/CI.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ jobs:
99
continue-on-error: true
1010
strategy:
1111
matrix:
12-
python-version: [3.9.23, 3.13.5, 3.14.0-rc.3] # pypy-3.9
13-
# python-version: [{earliest: 3.9}, {latest: 3.13.0}] # pypy-3.9
14-
rf-version: [6.1.1, 7.3.2]
15-
selenium-version: [4.28.1, 4.29.0, 4.30.0, 4.31.0, 4.32.0, 4.33.0, 4.34.2]
12+
python-version: [3.10.16, 3.13.5, 3.14.4, pypy-3.10]
13+
# python-version: [{earliest: 3.10}, {latest: 3.14.0-rc.3}, {pypy: pypy-3.10}]
14+
rf-version: [6.1.1, 7.4.2]
15+
selenium-version: [4.29.0, 4.30.0, 4.31.0, 4.32.0, 4.33.0, 4.34.2, 4.43.0]
1616
browser: [chrome] # firefox, chrome, headlesschrome, edge
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
- name: Set up Python ${{ matrix.python-version }} with Robot Framework ${{ matrix.rf-version }}
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Setup Chrome
25-
uses: browser-actions/setup-chrome@v1
25+
uses: browser-actions/setup-chrome@v2
2626
with:
2727
chrome-version: 138
2828
install-dependencies: true
@@ -44,12 +44,12 @@ jobs:
4444
export DISPLAY=:99.0
4545
Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 &
4646
- name: Install dependencies
47-
if: matrix.python-version != 'pypy-3.7'
47+
if: matrix.python-version != 'pypy-3.10'
4848
run: |
4949
python -m pip install --upgrade pip
5050
pip install -r requirements-dev.txt
5151
- name: Install dependencies for pypy
52-
if: matrix.python-version == 'pypy-3.9'
52+
if: matrix.python-version == 'pypy-3.10'
5353
run: |
5454
python -m pip install --upgrade pip
5555
pip install -r requirements.txt
@@ -68,7 +68,7 @@ jobs:
6868
echo "WEBDRIVERPATH=$($SELENIUM_MANAGER_EXE --browser chrome --debug | awk '/INFO[[:space:]]Driver path:/ {print $NF;exit}')" >> "$GITHUB_ENV"
6969
echo "$WEBDRIVERPATH"
7070
- name: Generate stub file for ${{ matrix.python-version }}
71-
if: matrix.python-version != 'pypy-3.9'
71+
if: matrix.python-version != 'pypy-3.10'
7272
run: |
7373
invoke gen-stub
7474
@@ -84,20 +84,20 @@ jobs:
8484
# xvfb-run --auto-servernum python atest/run.py --zip ${{ matrix.browser }}
8585

8686
- name: Run tests with latest python and latest robot framework
87-
if: matrix.python-version == '3.13.0' && matrix.rf-version == '7.2.2'
87+
if: matrix.python-version == '3.14.4' && matrix.rf-version == '7.4.1'
8888
run: |
8989
xvfb-run --auto-servernum python atest/run.py --zip ${{ matrix.browser }}
9090
9191
# - name: Run tests with Selenium Grid
92-
# if: matrix.python-version == '3.11' && matrix.rf-version == '3.2.2' && matrix.python-version != 'pypy-3.9'
92+
# if: matrix.python-version == '3.11' && matrix.rf-version == '3.2.2' && matrix.python-version != 'pypy-3.10'
9393
# run: |
9494
# wget --no-verbose --output-document=./selenium-server-standalone.jar http://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
9595
# sudo chmod u+x ./selenium-server-standalone.jar
9696
# xvfb-run --auto-servernum python atest/run.py --zip headlesschrome --grid True
9797

98-
- uses: actions/upload-artifact@v4
98+
- uses: actions/upload-artifact@v7
9999
if: failure()
100100
with:
101101
name: sl_$${{ matrix.python-version }}_$${{ matrix.rf-version }}_$${{ matrix.selenium-version }}_$${{ matrix.browser }}
102102
path: atest/zip_results
103-
overwrite: true
103+
overwrite: true

.github/workflows/Select.yml

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
matrix:
1111
config:
1212
- description: latest
13-
python-version: 3.13.10
14-
rf-version: 7.4.1
15-
selenium-version: 4.39.0
13+
python-version: 3.14.4
14+
rf-version: 7.4.2
15+
selenium-version: 4.43.0
1616
browser: chrome
1717
- description: previous
1818
python-version: 3.12.12
@@ -24,19 +24,23 @@ jobs:
2424
rf-version: 6.1.1
2525
selenium-version: 4.37.0
2626
browser: chrome
27-
27+
- description: latest
28+
python-version: 3.14.4
29+
rf-version: 7.4.1
30+
selenium-version: 4.39.0
31+
browser: firefox
2832
steps:
29-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
3034
- name: Configuration Description
3135
run: |
3236
echo "${{ matrix.config.description }} configuration"
3337
echo "Testing with RF v${{ matrix.config.rf-version }}, Selenium v${{ matrix.config.selenium-version}}, Python v${{ matrix.config.python-version }} under ${{ matrix.config.browser }}"
3438
- name: Set up Python ${{ matrix.config.python-version }}
35-
uses: actions/setup-python@v5
39+
uses: actions/setup-python@v6
3640
with:
3741
python-version: ${{ matrix.config.python-version }}
3842
- name: Setup ${{ matrix.config.browser }} browser
39-
uses: browser-actions/setup-chrome@v1
43+
uses: browser-actions/setup-chrome@v2
4044
with:
4145
chrome-version: latest
4246
install-dependencies: true
@@ -71,9 +75,45 @@ jobs:
7175
run: |
7276
xvfb-run --auto-servernum python atest/run.py --zip ${{ matrix.config.browser }}
7377
74-
- uses: actions/upload-artifact@v4
78+
- uses: actions/upload-artifact@v7
7579
if: failure()
7680
with:
77-
name: sl_$${{ matrix.config.python-version }}_$${{ matrix.config.rf-version }}_$${{ matrix.config.selenium-version }}_$${{ matrix.config.browser }}
81+
name: sl_${{ matrix.config.python-version }}_${{ matrix.config.rf-version }}_${{ matrix.config.selenium-version }}_${{ matrix.config.browser }}
7882
path: atest/zip_results
79-
overwrite: true
83+
overwrite: true
84+
ruff:
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- uses: actions/checkout@v6
89+
90+
- name: Set up Python
91+
uses: actions/setup-python@v6
92+
with:
93+
python-version: "3.14.4"
94+
95+
- name: Install dev dependencies
96+
run: |
97+
python -m pip install --upgrade pip
98+
pip install -r requirements-dev.txt
99+
100+
- name: Ruff format check
101+
id: format
102+
continue-on-error: true
103+
run: |
104+
python -m invoke formatter --check
105+
106+
- name: Ruff lint
107+
id: lint
108+
continue-on-error: true
109+
run: |
110+
python -m invoke lint
111+
112+
- name: Fail if any Ruff step failed
113+
if: always()
114+
run: |
115+
echo "format outcome: ${{ steps.format.outcome }}"
116+
echo "lint outcome: ${{ steps.lint.outcome }}"
117+
if [ "${{ steps.format.outcome }}" != "success" ] || [ "${{ steps.lint.outcome }}" != "success" ]; then
118+
exit 1
119+
fi

CONTRIBUTING.rst

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,23 @@ needed in internal code. When docstrings are added, they should follow
118118
`PEP-257`_. See `Documentation`_ section below for more details about
119119
documentation syntax, generating docs, etc.
120120

121-
The code should be formatted with `Black`_ and errors found by `flake8`_
122-
should be fixed. Black and flake8 can be run by using
123-
command::
121+
The code should be formatted and linted with `Ruff`_. See Development commands below for more details.
124122

125-
inv lint
123+
Development commands
124+
~~~~~~~~~~~~~~~~~~~~
126125

127-
By default flake8 ignores line length error E501, but it does not ignore
128-
warning W503. In practice Black formats list access like this::
126+
Use `invoke`_ tasks for common local checks and test runs::
129127

130-
list[1 : 2]
128+
inv formatter --check # Check formatting with Ruff
129+
inv formatter # Format source files with Ruff
130+
inv lint # Run Ruff lint checks
131+
inv lint --fix # Apply safe Ruff lint fixes
132+
inv utest # Run unit tests
133+
inv atest # Run acceptance tests (headlesschrome)
131134

132-
But flake8 will display an warning about it. This should be manually
133-
fixed to look like::
134-
135-
list[1:2]
135+
Run these before opening a pull request so local results are close to CI.
136+
Use the project virtual environment and pinned dependencies from
137+
``requirements-dev.txt`` for consistent results across local runs and CI.
136138

137139
Documentation
138140
-------------
@@ -160,7 +162,7 @@ individual keywords.
160162

161163
Keyword documentation can be easily created using `invoke`_ task::
162164

163-
inv keyword_documentation
165+
inv kw-docs
164166

165167
Resulting docs should be verified before the code is committed.
166168

@@ -245,5 +247,4 @@ the same code as your changes. In that case you should
245247
.. _utest/README.rst: https://github.com/robotframework/SeleniumLibrary/blob/master/utest/README.rst
246248
.. _sync your fork: https://help.github.com/articles/syncing-a-fork/
247249
.. _resolve conflicts: https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line
248-
.. _Black: https://github.com/psf/black
249-
.. _flake8: https://github.com/PyCQA/flake8
250+
.. _Ruff: https://github.com/astral-sh/ruff

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SeleniumLibrary_ is a web testing library for `Robot Framework`_ that
1010
utilizes the Selenium_ tool internally. The project is hosted on GitHub_
1111
and downloads can be found from PyPI_.
1212

13-
SeleniumLibrary currently works with Selenium 4. It supports Python 3.8 through 3.13.
13+
SeleniumLibrary currently works with Selenium 4. It supports Python 3.10 through 3.13.
1414
In addition to the normal Python_ interpreter, it works also
1515
with PyPy_.
1616

atest/acceptance/1-plugin/OpenBrowserExample.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ def create_driver(
121121
)
122122

123123
def create_seleniumwire(
124-
self, desired_capabilities, remote_url, options=None, service_log_path=None, service=None,
124+
self,
125+
desired_capabilities,
126+
remote_url,
127+
options=None,
128+
service_log_path=None,
129+
service=None,
125130
):
126131
logger.info(self.extra_dictionary)
127132
return webdriver.Chrome()

atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ${event_firing_or_none} ${NONE}
1010

1111
*** Test Cases ***
1212
Open Browser To Start Page
13-
[Tags] NoGrid
13+
[Tags] NoGrid SKIP_ON_WINDOWS
1414
[Documentation]
1515
... LOG 1:30 DEBUG Wrapping driver to event_firing_webdriver.
1616
... LOG 1:32 INFO Got driver also from SeleniumLibrary.

atest/acceptance/create_webdriver.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Create Webdriver Creates Functioning WebDriver
88
[Documentation]
99
... LOG 1:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver.
1010
... LOG 1:18 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+.
11-
[Tags] Known Issue Internet Explorer Known Issue Safari
11+
[Tags] Known Issue Internet Explorer Known Issue Safari SKIP_ON_WINDOWS
1212
[Setup] Set Driver Variables
1313
Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS}
1414
Go To ${FRONT_PAGE}

atest/acceptance/entry_point.robot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Entry Point Version
77
${process} = Run Process
88
... python -m SeleniumLibrary.entry --version
99
... shell=True
10-
... cwd=${EXECDIR}/src
10+
... cwd=${EXECDIR}${/}src
1111
Log ${process.stdout}
1212
Log ${process.stderr}
1313
Should Be Equal As Integers ${process.rc} 0
@@ -17,18 +17,18 @@ Entry Point Version
1717

1818
Entry Point Translation
1919
${process} = Run Process
20-
... python -m SeleniumLibrary.entry translation ${OUTPUT_DIR}/translation.json
20+
... python -m SeleniumLibrary.entry translation ${OUTPUT_DIR}${/}translation.json
2121
... shell=True
22-
... cwd=${EXECDIR}/src
22+
... cwd=${EXECDIR}${/}src
2323
Log ${process.stdout}
2424
Log ${process.stderr}
2525
Should Be Equal As Integers ${process.rc} 0
2626
Should Be Empty ${process.stderr}
27-
Should Be Equal ${process.stdout} Translation file created in ${OUTPUT_DIR}/translation.json
27+
Should Be Equal ${process.stdout} Translation file created in ${OUTPUT_DIR}${/}translation.json
2828
${process} = Run Process
29-
... python -m SeleniumLibrary.entry translation --compare ${OUTPUT_DIR}/translation.json
29+
... python -m SeleniumLibrary.entry translation --compare ${OUTPUT_DIR}${/}translation.json
3030
... shell=True
31-
... cwd=${EXECDIR}/src
31+
... cwd=${EXECDIR}${/}src
3232
Log ${process.stdout}
3333
Log ${process.stderr}
3434
Should Be Equal As Integers ${process.rc} 0

0 commit comments

Comments
 (0)