Skip to content

Conversation

@Andre-Medina
Copy link

Adding docstrings to the python code for By and Webdriver.find_element to show examples and key information when using IDE.

Description

Adding documentation to the following:

  • py/selenium/webdriver/remote/webdriver.py to WebDriver.find_element
  • py/selenium/webdriver/common/by.py to By

To generate better docstrings with examples

Motivation and Context

Found there was no documentation which led to confusion for new developers. Came from discussing in related issue #14746

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.

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2024

CLA assistant check
All committers have signed the CLA.

@shbenzer
Copy link
Contributor

You can refer to this page for examples

@shbenzer
Copy link
Contributor

Also once you've finished, run ./scripts/format.sh to help with linting

@VietND96 VietND96 added the C-py Python Bindings label Nov 19, 2024
@shbenzer
Copy link
Contributor

shbenzer commented Dec 23, 2024

@Andre-Medina if you look at locators, you should be able to grab some easy examples for each locator strategy

@github-actions github-actions bot added the J-stale Applied to issues that become stale, and eventually closed. label Jun 21, 2025
@github-actions github-actions bot closed this Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-py Python Bindings J-stale Applied to issues that become stale, and eventually closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants