# Given /^I click about phone$/ do # scroll_to('About phone').click # end # # Given /^the Android version is a number$/ do # android_version = 'Android version' # scroll_to android_version # # view = 'android.widget.TextView' # version = xpath(%Q(//#{view}[preceding-sibling::#{view}[@text="#{android_version}"]])).text # valid = !version.match(/\d/).nil? # # expect(valid).to eq(true) # end