Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py] add doc for driver_path_env_key #14997

Merged
merged 3 commits into from
Jan 1, 2025
Merged

Conversation

Delta456
Copy link
Contributor

@Delta456 Delta456 commented Dec 31, 2024

User description

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Adds doc for driver_path_env_key as they were missing

Motivation and Context

Makes the doc easier to know and use the parameter

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Documentation, Enhancement


Description

  • Added documentation for the driver_path_env_key parameter across all major browser service classes (Chromium, Edge, Firefox, Safari)
  • The parameter allows users to specify an environment variable that contains the path to the driver executable
  • Improves code documentation and makes the parameter usage more clear for developers

Changes walkthrough 📝

Relevant files
Documentation
service.py
Add driver_path_env_key documentation to ChromiumService 

py/selenium/webdriver/chromium/service.py

  • Added documentation for driver_path_env_key parameter in
    ChromiumService class
  • +1/-0     
    service.py
    Add driver_path_env_key documentation to Edge Service       

    py/selenium/webdriver/edge/service.py

  • Added documentation for driver_path_env_key parameter in Edge Service
    class
  • +1/-0     
    service.py
    Add driver_path_env_key documentation to Firefox Service 

    py/selenium/webdriver/firefox/service.py

  • Added documentation for driver_path_env_key parameter in Firefox
    Service class
  • +1/-0     
    service.py
    Add driver_path_env_key documentation to Safari Service   

    py/selenium/webdriver/safari/service.py

  • Added documentation for driver_path_env_key parameter in Safari
    Service class
  • +1/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Clarify documentation to indicate platform-specific behavior of a parameter

    Add a note that the driver_path_env_key parameter may be ignored on macOS since
    Safari's driver location is typically fixed at /usr/bin/safaridriver

    py/selenium/webdriver/safari/service.py [35]

    -:param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable.
    +:param driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable. Note: On macOS, Safari's driver is typically fixed at `/usr/bin/safaridriver`.
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: The suggestion adds valuable platform-specific context about Safari's driver location on macOS, which helps users understand potential limitations of the parameter. However, it's only a documentation improvement with moderate impact.

    5

    @diemol diemol merged commit 7983769 into SeleniumHQ:trunk Jan 1, 2025
    1 check passed
    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.

    2 participants