Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add Python BiDi examples for Register Basic Auth (network.authRequire… #2452

Add Python BiDi examples for Register Basic Auth (network.authRequire…

Add Python BiDi examples for Register Basic Auth (network.authRequire… #2452

name: Run Python examples
on:
workflow_dispatch:
schedule:
- cron: '50 22 * * *'
pull_request:
branches:
- trunk
paths:
- 'examples/python/**'
push:
branches:
- trunk
paths:
- 'examples/python/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DISPLAY: :99
jobs:
tests:
strategy:
fail-fast: false
matrix:
os: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && fromJSON('["ubuntu", "windows", "macos"]') || fromJSON('["ubuntu", "windows"]') }}
release: [ stable, nightly ]
include:
- release: stable
python: '3.10'
- release: nightly
python: '3.14'
runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v7
- name: Remove driver directories Windows
if: matrix.os == 'windows'
run: |
rm "$env:ChromeWebDriver" -r -v
rm "$env:EdgeWebDriver" -r -v
rm "$env:GeckoWebDriver" -r -v
- name: Remove driver directories Non-Windows
if: matrix.os != 'windows'
run: |
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
- name: Start Xvfb
if: matrix.os == 'ubuntu'
run: Xvfb :99 &
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- name: Install dependencies nightly non-Windows
if: matrix.release == 'nightly' && matrix.os != 'windows'
run: |
pip install -r ./scripts/requirements.txt
latest_nightly_python=$(python ./scripts/latest-python-nightly-version.py)
cd examples/python
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install --index-url https://test.pypi.org/simple/ selenium==$latest_nightly_python --extra-index-url https://pypi.org/simple/ --upgrade --force-reinstall --break-system-packages
- name: Install dependencies nightly Windows
if: matrix.release == 'nightly' && matrix.os == 'windows'
run: |
pip install -r ./scripts/requirements.txt
$latest_nightly_python = python ./scripts/latest-python-nightly-version.py
cd examples/python
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install --index-url https://test.pypi.org/simple/ selenium==$latest_nightly_python --extra-index-url https://pypi.org/simple/ --upgrade --force-reinstall --break-system-packages
- name: Install dependencies stable
if: matrix.release == 'stable'
working-directory: ./examples/python
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Run tests
timeout-minutes: 60
working-directory: ./examples/python
run: pytest --reruns 3 -n auto
Morty Proxy This is a proxified and sanitized view of the page, visit original site.