Skip to content

[py] Update type annotation to include WebElement #15338

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

Closed
wants to merge 2 commits into from

Conversation

cgoldberg
Copy link
Contributor

@cgoldberg cgoldberg commented Feb 25, 2025

User description

fixes: #15334

This adds WebElement to the type annotation for the frame_to_be_available_and_switch_to_it function in the expected_conditions module. The docstring was also updated to reflect this.

Motivation and Context

The type annotation was incorrect, since it was missing WebElement.

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

Bug fix


Description

  • Updated type annotation for frame_to_be_available_and_switch_to_it to include WebElement.

  • Adjusted docstring to reflect the updated type annotation.


Changes walkthrough 📝

Relevant files
Bug fix
expected_conditions.py
Add `WebElement` to type annotation and update docstring 

py/selenium/webdriver/support/expected_conditions.py

  • Added WebElement to the type annotation for the locator parameter.
  • Updated the docstring to reflect the new type annotation.
  • +2/-2     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • This adds `WebElement` to the type annotation for the `frame_to_be_available_and_switch_to_it` function in the `expected_conditions` module.
    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 ✨

    No code suggestions found for the PR.

    @cgoldberg
    Copy link
    Contributor Author

    this was superseded by #15337

    @cgoldberg cgoldberg closed this Feb 25, 2025
    @cgoldberg cgoldberg deleted the py-fix-type-annotation branch February 25, 2025 19:09
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    1 participant