Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Robotic Fingers

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Robotic Fingers

Avatar for Thomas Bartelmess

Thomas Bartelmess

April 21, 2013
Tweet

Other Decks in Programming

Transcript

  1. `whoami` I am Thomas Bartelmess. I am from Germany and

    moved to Canada a couple years ago. I work at Marketcircle. We make software for small business. Sometimes I tweet @bartelmess.
  2. UI Testing • Simulate a user using your application •

    Addition, not replacement for unit testing
  3. Mac OS X UI Automation iOS Accessibility API JavaScript Ruby

    Accessibility API Instruments Text Editor/Command Line AXElements
  4. Accessiblity • API to interact with User Elements • Used

    by OS X to provide tools like VoiceOver • Available on OS X and iOS
  5. Your app must be accessible • Most things just work

    • Custom views may need extra help • If your app is not accessible, it’s a good idea to do so - there are people who need it
  6. Accessibility in 15 seconds • A simplified tree of you

    view hierarchy • Every element has properties • Some of them can be modified
  7. AXElements in 45 seconds Step 1: Get the Application app

    = app_with_bundle_identifier('com.apple.AddressBook') set_focus_to app
  8. AXElements in 45 seconds Step 2: Find an element my_button

    = app.button(id:'contactsPlusButton') my_textfield = app.text_field(id:'_NS:123') my_button = app.button(title:'My button title')
  9. AXElements in 45 seconds Step 3: Do something with the

    Element click my_button set my_text_field, “Hello World”
  10. Example require 'rubygems' require 'ax_elements' app = app_with_bundle_identifier('com.apple.AddressBook') set_focus_to app

    click app.button(id:'contactsPlusButton') click app.check_box(id:'_NS:480') set app.text_field(id:'_NS:367'), 'NSNorth' click app.check_box(id:'editButton')
  11. Testing • There are a lot of good ruby testing

    frameworks • Rspec • Cucumber • Minitest