google / EarlGrey

:tea: iOS UI Automation Test Framework
http://google.github.io/EarlGrey/
Apache License 2.0
5.61k stars 741 forks source link

grey_setPickerColumnToValue action does not work for SwiftUI Picker #1685

Open ileon12 opened 2 years ago

ileon12 commented 2 years ago

Hello! When trying to select a determined value on a SwiftUI Picker wheel using grey_setPickerColumnToValue(), I get the following error:

"UIPickerView does not contain desired value!"

Even though the value does exist on the picker.

You can use this sample to reproduce Xcode: 13.2.1 Device: iPhone 7 plus (iOS 15.1)

Appreciate any help.

adil-hussain-84 commented 2 years ago

This is related to issue #1679. The existing matchers in EarlGrey work for UIKit views only and I can't figure out right now how to write custom actions and matchers for SwiftUI views.