taskrabbit / ReactNativeSampleApp

Example app in React Native: sort of like twitter/tumblr
MIT License
928 stars 321 forks source link

how does elementById work? #17

Closed rt2zz closed 8 years ago

rt2zz commented 8 years ago

Thanks for sharing this. Question: how does elementById work in the tests, e.g. https://github.com/taskrabbit/ReactNativeSampleApp/blob/master/test/integration/authentication.test.js#L13

I assume this is something to do with the way appium works, but I do not see anywhere an id of "Username" is assigned to any elements.

bleonard commented 8 years ago

Frankly, it's not clear to me. I've notice when using appium with React native and regular iOS apps, that the IDs are the same as the labels unless explicitly given one in the ObjC code.

So that's just how it works. There is an inspector program that is an Appium mac app to see the IDs and xpaths and such.

rt2zz commented 8 years ago

hah :+1: