Skip to content

Conversation

@cgoldberg
Copy link
Member

@cgoldberg cgoldberg commented Oct 26, 2025

User description

Description

This PR finishes upgrading all tests to use Selenium 4.38.

It also upgrades Python dependencies to newer versions and fixes Python CI workflows to run on Python 3.10 and 3.14 (since we dropped support for 3.9).

Types of changes

  • Fixed examples

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

Enhancement


Description

  • Upgrade Selenium WebDriver to version 4.38.0 across all language examples

  • Update Python CI workflows to test on Python 3.10 and 3.14

  • Drop Python 3.9 support, add Python 3.14 to test matrix

  • Update Python and Ruby dependencies to latest compatible versions


Diagram Walkthrough

flowchart LR
  A["Selenium 4.35.0"] -- "upgrade" --> B["Selenium 4.38.0"]
  C["Python 3.9/3.11/3.12/3.13"] -- "update matrix" --> D["Python 3.10/3.11/3.12/3.13/3.14"]
  E["Python Dependencies"] -- "update versions" --> F["pytest 8.4.2, trio 0.31.0, tox 4.32.0"]
  G["Ruby Dependencies"] -- "update versions" --> H["selenium-devtools 0.142.0"]
  B --> I["All Examples Updated"]
  D --> I
  F --> I
  H --> I
Loading

File Walkthrough

Relevant files
Configuration changes
python-examples.yml
Update Python CI test matrix to 3.10 and 3.14                       

.github/workflows/python-examples.yml

  • Replace Python 3.9 with 3.10 for stable release tests on Ubuntu and
    Windows
  • Update nightly tests to use Python 3.14 instead of 3.11, 3.12, and
    3.13
  • Standardize Python 3.14 across all nightly test environments
+5/-5     
tox.ini
Update tox environments to drop 3.9, add 3.14                       

examples/python/tox.ini

  • Remove py39 from test environment list
  • Add py314 to test environment list
  • Update documentation example from py313 to py314
+2/-2     
remote_webdriver_spec.rb
Update Selenium Server JAR version reference                         

examples/ruby/spec/drivers/remote_webdriver_spec.rb

  • Update Selenium Server JAR reference from 4.35.0 to 4.38.0
+1/-1     
Dependencies
SeleniumDocs.csproj
Upgrade .NET Selenium packages to 4.38.0                                 

examples/dotnet/SeleniumDocs/SeleniumDocs.csproj

  • Upgrade Selenium.Support from 4.35.0 to 4.38.0
  • Upgrade Selenium.WebDriver from 4.35.0 to 4.38.0
+2/-2     
pom.xml
Upgrade Java Selenium dependency to 4.38.0                             

examples/java/pom.xml

  • Update selenium.version property from 4.35.0 to 4.38.0
+1/-1     
pom.xml
Upgrade Kotlin Selenium dependency to 4.38.0                         

examples/kotlin/pom.xml

  • Update selenium.version property from 4.35.0 to 4.38.0
+1/-1     
requirements.txt
Upgrade Python dependencies including Selenium 4.38.0       

examples/python/requirements.txt

  • Upgrade selenium from 4.35.0 to 4.38.0
  • Update pytest from 8.4.1 to 8.4.2
  • Update trio from 0.30.0 to 0.31.0
  • Update pytest-rerunfailures from 15.1 to 16.1
  • Update tox from 4.28.4 to 4.32.0
+5/-5     
Gemfile
Upgrade Ruby Selenium gems to latest versions                       

examples/ruby/Gemfile

  • Upgrade selenium-webdriver from 4.35.0 to 4.38.0
  • Upgrade selenium-devtools from 0.139.0 to 0.142.0
+2/-2     

@netlify
Copy link

netlify bot commented Oct 26, 2025

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5897e34

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Oct 26, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No audit logs: The PR only updates versions and CI matrices without introducing or affecting any
application logic where critical actions would be logged, so audit trail compliance cannot
be assessed from these changes.

Referred Code
    - os: ubuntu
      release: stable
      python: '3.10'
    - os: ubuntu
      release: nightly
      python: '3.14'
    - os: windows
      release: stable
      python: '3.10'
    - os: windows
      release: nightly
      python: '3.14'
    - os: macos
      release: stable
      python: '3.10'
    - os: macos
      release: nightly
      python: '3.14'
runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- name: Checkout GitHub repo


 ... (clipped 1 lines)
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
No error handling: The added change only updates a JAR filename in a test setup without modifying or adding
error handling; robustness cannot be evaluated from this version bump.

Referred Code
  Selenium::Server.new(File.expand_path(File.join('..', '..', '..', 'selenium-server-4.38.0.jar'), __dir__),
                       background: true,
                       args: %w[--selenium-manager true --enable-managed-downloads true])
end
Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
Indirect impact: Dependency upgrades may alter error messages or logging behavior, but the diff does not
add user-facing error handling; security of errors cannot be determined from these changes
alone.

Referred Code
selenium==4.38.0
pytest==8.4.2
trio==0.31.0
pytest-trio==0.8.0
pytest-rerunfailures==16.1
flake8==7.3.0
requests==2.32.5
tox==4.32.0
pytest-xdist==3.8.0
Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status:
Logging unchanged: The workflow matrix and dependency version bumps do not introduce logging code; whether
logs avoid sensitive data cannot be assessed from this diff.

Referred Code
    - os: ubuntu
      release: stable
      python: '3.10'
    - os: ubuntu
      release: nightly
      python: '3.14'
    - os: windows
      release: stable
      python: '3.10'
    - os: windows
      release: nightly
      python: '3.14'
    - os: macos
      release: stable
      python: '3.10'
    - os: macos
      release: nightly
      python: '3.14'
runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- name: Checkout GitHub repo


 ... (clipped 1 lines)
Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
No input paths: The changes adjust interpreter targets and versions without introducing input processing;
validation and data handling security cannot be evaluated from these modifications.

Referred Code
# Tox (https://tox.wiki/) is a tool for running tests in multiple
# virtualenvs. This configuration file will run the test suite on all
# supported python versions. To use it, run "tox" from this directory.
#
# For a specific environment, run: "tox -e <env>" (i.e.: "tox -e py314")
#
# This tox configuration will skip any Python interpreters that can't be found.
# To manage multiple Python interpreters for covering all versions, you can use
# pyenv: https://github.com/pyenv/pyenv


[tox]
env_list =
    py310
    py311
    py312
    py313
    py314
skip_missing_interpreters = True

[testenv]


 ... (clipped 1 lines)
  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Oct 26, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Reinstate CI testing for all Python versions

The Python CI workflow was modified to only test versions 3.10 and 3.14,
removing tests for 3.11, 3.12, and 3.13. It is suggested to reinstate testing
for all supported Python versions (3.10-3.14) as defined in tox.ini to maintain
test coverage.

Examples:

.github/workflows/python-examples.yml [27-46]
      matrix:
        include:
        - os: ubuntu
          release: stable
          python: '3.10'
        - os: ubuntu
          release: nightly
          python: '3.14'
        - os: windows
          release: stable

 ... (clipped 10 lines)
examples/python/tox.ini [13-18]
env_list =
    py310
    py311
    py312
    py313
    py314

Solution Walkthrough:

Before:

# .github/workflows/python-examples.yml
strategy:
  matrix:
    include:
    - os: ubuntu
      release: stable
      python: '3.10'
    - os: ubuntu
      release: nightly
      python: '3.14'
    - os: windows
      release: stable
      python: '3.10'
    - os: windows
      release: nightly
      python: '3.14'
    # ... and so on, only testing 3.10 and 3.14

After:

# .github/workflows/python-examples.yml
strategy:
  matrix:
    python: ['3.10', '3.11', '3.12', '3.13', '3.14']
    os: [ubuntu-latest, windows-latest, macos-latest]
    # This would run tests against all supported python versions
    # on all specified operating systems.
    # A more limited matrix could also be used, as long as all
    # python versions are covered.
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical flaw in the PR, where CI test coverage for supported Python versions (3.11, 3.12, 3.13) is removed, creating a risk of undetected regressions.

High
General
Dynamically construct JAR file path

Dynamically construct the Selenium server JAR file path using
Selenium::WebDriver::VERSION to avoid hardcoding the version number and improve
maintainability.

examples/ruby/spec/drivers/remote_webdriver_spec.rb [10-12]

-Selenium::Server.new(File.expand_path(File.join('..', '..', '..', 'selenium-server-4.38.0.jar'), __dir__),
+jar_file = "selenium-server-#{Selenium::WebDriver::VERSION}.jar"
+Selenium::Server.new(File.expand_path(File.join('..', '..', '..', jar_file), __dir__),
                      background: true,
                      args: %w[--selenium-manager true --enable-managed-downloads true])
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies a hardcoded version string, which was just updated in this PR, and proposes a dynamic approach that improves maintainability by preventing future inconsistencies.

Low
  • Update

@cgoldberg
Copy link
Member Author

@harsha509 @diemol please review

@cgoldberg
Copy link
Member Author

Java is failing with these changes... not sure why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant