这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Mar 8, 2025

To support #986

Add https://developer.apple.com/documentation/xctest/xcuielementattributes/placeholdervalue

Example usage with our UICatalog app in the text field view:

  • find element
> e = driver.find_element :predicate, 'placeholderValue == "Placeholder text"'
=> #<Appium::Core::Element:0x1ca9e97bebb7606 id="BA000000-0000-0000-CEF9-000000000000">
e.placeholderValue
=> "Placeholder text"
  • part of page source
                       <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" accessible="false" x="8" y="656" width="367" height="1" index="3" placeholderValue=""/>
                        <XCUIElementTypeTextField type="XCUIElementTypeTextField" value="" label="" enabled="true" visible="true" accessible="true" x="16" y="621" width="361" height="28" index="4" placeholderValue="Enter search text">
                          <XCUIElementTypeImage type="XCUIElementTypeImage" name="magnifyingglass" label="Search" enabled="true" visible="true" accessible="false" x="22" y="625" width="21" height="19" index="0" placeholderValue=""/>
Screenshot 2025-03-08 at 1 01 17 AM

@mykola-mokhnach
Copy link

It looks like unit tests need some updates

@KazuCocoa
Copy link
Member Author

The tests are good now

@KazuCocoa KazuCocoa requested review from mykola-mokhnach and removed request for mykola-mokhnach March 9, 2025 07:52
Copy link

@mykola-mokhnach mykola-mokhnach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also do not forget to update xcuitest driver docs later with these changes

@KazuCocoa KazuCocoa merged commit 8c3a1cb into master Mar 9, 2025
46 checks passed
@KazuCocoa KazuCocoa deleted the placeholder branch March 9, 2025 08:37
github-actions bot pushed a commit that referenced this pull request Mar 9, 2025
## [9.1.0](v9.0.6...v9.1.0) (2025-03-09)

### Features

* add placeholderValue ([#987](#987)) ([8c3a1cb](8c3a1cb))
@github-actions
Copy link

github-actions bot commented Mar 9, 2025

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants