Automation Happy Hour 5: Craigslist

Moving on from Zoom, in this episode JLipps attempts to automate the native mobile app for the hugely popular social buying/selling site, Craigslist!
Mobile 
Group

Code samples for Automation Happy Hour are available at github.com/appium-pro/ahh

In this episode, we take a look at the mobile app for Craigslist, which has helped me rent every home I've ever lived in since college! Craiglist has a famously simple website (so 1999), and I suspected that the mobile app would be similar. While it appears to be a native Android app, the design is indeed the same style as the website. Here's what we learned when trying to automate the Craigslist app:

  • Craigslist's developers added no IDs to their elements, so we were forced to use XPath + @text node restrictions to find pretty much everything.
  • When we're finding based on the text attributes, we can run into problems when elements don't have unique text displayed. In that case, we can use advanced XPath queries that take into account contextual information to make sure we target the correct element.
  • If we want to make assertions on currency text, we can use regular expressions to turn the text into comparable numbers.

For the full report, watch the video above!