4 react native

1 有placeholder的textinput

EarlGrey.select(elementWithMatcher: grey_text("Email")).assert(grey_sufficientlyVisible()).perform(grey_tap()).perform(grey_typeText("ugcp1213@qq.com\n"));

EarlGrey.select(elementWithMatcher: grey_text("Password")).assert(grey_sufficientlyVisible()).perform(grey_tap()).perform(grey_typeText("12345678\n"))

1) grey_tap()  avoid exception

2)  "\n" is "return" of keyboard, hide keyboard 

2  Button with label ( Accessibility Inspector could find)

EarlGrey.select(elementWithMatcher: grey_accessibilityLabel("SIGN IN")).assert(grey_sufficientlyVisible()).perform(grey_tap());


react-native file:

<TouchableOpacity accessible={true}

accessibilityLabel={'LOGIN_WITH_FACEBOOK'} TouchableOpacity>

earlgrey file:

EarlGrey.select(elementWithMatcher: grey_accessibilityLabel("LOGIN_WITH_FACEBOOK")).perform(grey_tap());

3 import components(play up view) from others 

react-native file:

banners.push (

<TouchableOpacity  accessible={true}                        accessibilityLabel={'PLAY_UP_VIEW'} .....>

</TouchableOpacity>

);


Earlgrey file 

EarlGrey.select(elementWithMatcher: grey_accessibilityLabel("PLAY_UP_VIEW")).assert(grey_sufficientlyVisible()).perform(grey_tap());

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容