Repository navigation
Conversation
Selenium's default LocatorConverter rewrites these strategies to 'css selector'. Assert at the driver level that AppiumWebDriver (and child element lookups) keep them as-is, so removing the AppiumLocatorConverter wiring is caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012HCUdSWNJMojXCjBoxhg41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selenium's default
LocatorConverterrewritesid,nameandclass nameintocss selector(e.g.[id="foo"]), which Appium native contexts don't support.AppiumLocatorConverterexists to prevent that, but no unit test checked the request body the driver actually sends for these strategies.This adds one parametrized test in
test/unit/webdriver/webdriver_test.pythat callsdriver.find_element(by=..., value=...)and thenelement.find_element(...), and asserts the request body is exactly{'using': by, 'value': ...}.It's a driver-level alternative to #28. Unlike #28, it also fails if the
locator_converter=AppiumLocatorConverter()wiring inwebdriver.pyis removed.Verification
python -m pytest test/unit: 201 passedlocator_converter=AppiumLocatorConverter()commented out inappium/webdriver/webdriver.py, the new test fails, as expectedruff check/ruff format --checkpass🤖 Generated with Claude Code
https://claude.ai/code/session_012HCUdSWNJMojXCjBoxhg41
Generated by Claude Code