rn-touchable-view
v1.0.0 react-native react
rn-touchable-view
React-native wrapper for Touchable
components for use with appium. It appears that any components contained inside a touchable component are hidden within the heirarchy. By setting the appium
prop to true
, TouchableView
uses an alternative method for registering touch events on the view that allows appium to have visibility of any children.
Setup
npm install --save rn-touchable-view
Props
Prop | Type | |
---|---|---|
appium |
boolean |
(optional) enables visibility of children for use with appium |
type |
string |
(optional) type of Touchable component as a string [default: TouchableHighlight ] |
Usage
Import:
import TouchableView from 'rn-touchable-view';`
Example:
class Example extends Component {
render() {
return (
<TouchableView onPress={() => console.log('Tapped!')} type={'TouchableHighlight'} appium={true}>
<Text>Appium can see me!</Text>
</TouchableView>
);
}
}