-
Notifications
You must be signed in to change notification settings - Fork 563
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
feat: support list attribute #934
Conversation
Could you add test code like
Please sign the CLA as well. |
@@ -60,7 +60,7 @@ def get_attribute(self, name: str) -> Optional[Union[str, Dict]]: | |||
if attribute_value is None: | |||
return None | |||
|
|||
if isinstance(attribute_value, dict): | |||
if isinstance(attribute_value, dict) or isinstance(attribute_value, list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the return type must be updated as well and then (probably) mypy output fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also isinstance may accept a tuple as the second argument
Could you please provide some particular examples of where list is returned as attribute value? In java client all attributes are converted to strings: https://github.com/SeleniumHQ/selenium/blob/36585d189b2e9f2ced136a7e6c456ffe53604141/java/src/org/openqa/selenium/remote/RemoteWebElement.java#L149 |
@mykola-mokhnach ex) original value(string): '["abc", "def"]'
What should we do? |
W3C Spec needs the result to be a string. I don't know why somebody added dict there as a special return case. I assume it would be smart to perform |
@kkb912002 Could you give us what driver and element caused the case? Perhaps we could check the behavior as well |
This is specific to occurrences within my custom UI library. I plan to make changes to comply with the W3C spec, returning a string. Feel free to close this request. |
No description provided.