Testing your React Native App with Expo & Appium —Handling Cross Platform Differences

Image for post
Image for post
Photo by Hardik Sharma on Unsplash

Abstracting away complexity with Atomic Page Objects

Atom

The atom level class for a button provides a single interface for getting text regardless of the underlying component structure

Molecule

At the molecule level you create a means of interacting with a collection of atom level objects such as tabs in a tab bar

Organism

At the organism level you can provide interfaces for complex interactions across a number of molecule and atom level objects

Template

Page

At the page level you coordinate the lower level objects to interact or get the state of the page

Selectors

These methods can really speed up development as they make it easier to have a consistent means of dealing with accessibility IDs

Interacting with UI elements

Because of the lack of control that Android has using touchAction you need to use the lower level performActions functionality

Enabling code re-use with TypeScript decorators

Thanks to the decorator the StorybookItem class gains the press() method without you needing to write any new code

Next Steps: Running automation in CI

Written by

Technical Lead at BJSS. Interested in Automated Testing, Dev practises, Metal, Chiptune. All views my own.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store