selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Add type to parameter of webelement.WebElement.send_keys

Open adamtheturtle opened this issue 5 months ago • 0 comments

Description

I have set the type of *value to AnyKey. I chose AnyKey rather than str, despite the method docstring saying that value is "a string", because the method uses "".join(map(str, value)), which tells me that maybe a value element may not be a string.

Motivation and Context

Without this, pyright in strict mode gives me a reportUnknownMemberType error.

Types of changes

  • [x] 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

  • [x] 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.

adamtheturtle avatar Jan 23 '24 10:01 adamtheturtle