4 react native

1 有placeholder的textinput

EarlGrey.select(elementWithMatcher: grey_text("Email")).assert(grey_sufficientlyVisible()).perform(grey_tap()).perform(grey_typeText("[email protected]\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:

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 (

);


Earlgrey file 

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

你可能感兴趣的:(4 react native)