picker icon indicating copy to clipboard operation
picker copied to clipboard

[BUG] [iOS] Picker item testID does not show up in Appium / BrowserStack

Open jesuscc1993 opened this issue 2 years ago • 2 comments

Summary

The testID prop is set to items but it does not show up in Appium / BrowserStack when loading the iOS build.

Context

The testID prop is properly set:

{
  label: 'Algérie',
  testID: 'bsid-dz',
  value: 'DZ'
}

...and can be seen when debugging XCode:

xcode-debugger

However, this ID does not appear in any form when inspecting the app in Appium / BrowserStack:

appium-censored

At first I thought this had to be some issue on our end, since no one else seems to be complaining about it. But it looks like everything is as it should be and I have not been able to make any progress on this so I started to think this might actually be a library issue.

I tried updating the code to this:

// this makes it so accessibility props are accounted for
label.isAccessibilityElement = YES;
// these should show up on Appium, but none does
label.accessibilityHint = _items[row][@"testID"];
label.accessibilityIdentifier = _items[row][@"testID"];
label.accessibilityLabel = _items[row][@"testID"];
label.accessibilityValue = _items[row][@"testID"];

...but none of the accessibility props ever show up on Appium.

I'll keep looking into it, since I have been tasked to, but I have close to no experience with the native side and I am basically out of ideas so I doubt I'll be able to figure this out on my own.

Versions

"@react-native-picker/picker": "2.4.9", "react": "17.0.1", "react-native": "0.64.0",

jesuscc1993 avatar May 25 '23 15:05 jesuscc1993

I'm having the exact same issue. If there's a solution let me know

AngelCampa avatar Sep 04 '23 18:09 AngelCampa

Also encountering the same issue, it's hard to fix this even with patch-package as Option is obfuscated by react-native-web

wmcbain avatar Apr 30 '24 21:04 wmcbain