Skip to content

feat: expose elementResponseAttributes via Element#cached - #726

Closed
hoanle0126 wants to merge 1 commit into
appium:masterfrom
hoanle0126:feat/element-response-attributes-698
Closed

hoanle0126 wants to merge 1 commit into
appium:masterfrom
hoanle0126:feat/element-response-attributes-698

Conversation

@hoanle0126

Copy link
Copy Markdown
Contributor

Proposed changes

When shouldUseCompactResponses is set to false and elementResponseAttributes is configured on the Appium server, find_element and find_elements responses include the requested attributes alongside the element ID.

This PR updates Appium::Core::Base::Bridge (find_element_by, find_elements_by, active_element, and convert_to_element) to pass those response attributes into Appium::Core::Element and exposes them via Appium::Core::Element#cached (Appium::Core::Element::Cache), following the design discussed in #698 without storing client-side state from subsequent attribute calls.

Fixes #698

Testing

  • bundle exec rake rubocop
  • bundle exec rake steep
  • UNIT_TEST=true bundle exec rake test:unit
  • UNIT_TEST=true APPIUM_DRIVER=espresso bundle exec rake test:unit:android
  • UNIT_TEST=true APPIUM_DRIVER=appium bundle exec rake test:unit

@KazuCocoa

Copy link
Copy Markdown
Member

Thank you for creating this PR. I wanted to reduce the bridge implementation, so I made similar one as #727

@KazuCocoa KazuCocoa closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ability to return attributes from elementResponseAttributes

2 participants