You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not able to automate the drop down for iOS devices. Drop down options are not able to inspect through both iOS Accessibility inspector and Appium inspector
#303
Open
Sanoop-PM opened this issue
Sep 26, 2024
· 1 comment
Same issue I was also facing. There is one accessible prop available in the RN for each different View elements. Its by default true for all touchable elements. So if we have any touchable element as parent then all child elements are grouped and cannot be inspected inside Appium inspector. So while checking library code, I found same thing touchable parent without this prop to be set false. So for now I have added patch file using https://www.npmjs.com/package/patch-package. And now I am able to inspect the elements. I request @hoaphantn7604 to add this prop in the coming release.
Not able to automate the drop down for iOS devices.
Drop down options are not able to inspect through both iOS Accessibility inspector and Appium inspector.
Could you please let me know is there any way to make it work. We are struck with iOS automation.
Note: Android device its working fine.
react-native-element-dropdown version: 2.12.1
Code:
import React, { useState } from 'react';
import { StyleSheet, Text, View} from 'react-native';
import { Dropdown } from 'react-native-element-dropdown';
const data = [
{ label: 'Item 1', value: '1', testID: 'testID1', itemTestIDField: 'itemTestIDField1', itemAccessibilityLabelField: 'itemAccessibilityLabelField1' },
{ label: 'Item 2', value: '2', testID: 'testID2', itemTestIDField: 'itemTestIDField2', itemAccessibilityLabelField: 'itemAccessibilityLabelField2' },
{ label: 'Item 3', value: '3', testID: 'testID3', itemTestIDField: 'itemTestIDField3', itemAccessibilityLabelField: 'itemAccessibilityLabelField3' },
{ label: 'Item 4', value: '4', testID: 'testID4', itemTestIDField: 'itemTestIDField4', itemAccessibilityLabelField: 'itemAccessibilityLabelField4' },
{ label: 'Item 5', value: '5', testID: 'testID5', itemTestIDField: 'itemTestIDField5', itemAccessibilityLabelField: 'itemAccessibilityLabelField5' },
{ label: 'Item 6', value: '6', testID: 'testID6', itemTestIDField: 'itemTestIDField6', itemAccessibilityLabelField: 'itemAccessibilityLabelField6' },
{ label: 'Item 7', value: '7', testID: 'testID7', itemTestIDField: 'itemTestIDField7', itemAccessibilityLabelField: 'itemAccessibilityLabelField7' },
{ label: 'Item 8', value: '8', testID: 'testID8', itemTestIDField: 'itemTestIDField8', itemAccessibilityLabelField: 'itemAccessibilityLabelField8' },
];
const DropdownSample4 = () => {
const [selectedItem, setSelectedItem] = useState(null);
return (
{selectedItem && Selected Item: {selectedItem.label}}
<Dropdown
testID='testID'
itemTestIDField='itemTestIDField'
itemAccessibilityLabelField='itemAccessibilityLabelField'
style={styles.dropdown}
data={data}
labelField='label'
valueField='value'
placeholder='Select Item'
value={selectedItem}
onChange={(item) => setSelectedItem(item)}
/>
);
};
export default DropdownSample4;
const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
padding: 16,
justifyContent: 'center',
alignContent: 'center',
flex: 1,
},
dropdown: {
height: 50,
borderColor: 'gray',
borderWidth: 0.5,
borderRadius: 8,
paddingHorizontal: 8,
},
});
iOS Accessibility Inspector:
Appium Inspector:
The text was updated successfully, but these errors were encountered: