[ReactNative][Appium]testIDの振られ方

ReactNativeだと、 testID としてiOSだとaccessibilityID、Androidだとview tagを使ってIDを埋め込むのですね。なので、ReactNativeのアプリに対してidで要素を検索したい場合はAndroidだと特に従来のAppiumやEspressoとは少し異なる。

Appiumだと、以下でview tagの取得をサポートするらしい。

これつくと、resource idが同じ要素も細かくidを振って操作することもできるようになるので、安定性向上に寄与しそうですね。

Does EarlGrey support finding react-native elements?
https://github.com/google/EarlGrey/blob/master/docs/faq.md

react native

2 Comments

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.