Skip to content

Conversation

@cgoldberg
Copy link
Member

@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.
    @qodo-merge-pro
    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

    @qodo-merge-pro
    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @cgoldberg
    Copy link
    Member 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

    Development

    Successfully merging this pull request may close these issues.

    [🐛 Bug]: Incorrect type annotation for frame_to_be_available_and_switch_to_it function in expected_conditions module of Selenium Python library

    1 participant