#### Documentation - find_elements returns an empty array [] when no elements are found. ##### [app_lib on rubydoc.info](http://www.rubydoc.info/github/appium/ruby_lib/master/toplevel) - [iOS UI Automation](http://developer.apple.com/library/ios/#documentation/DeveloperTools/Reference/UIAutomationRef/_index.html) Example use `@driver.execute_script "UIATarget.localTarget().frontMostApp().mainWindow().rect()" ` - [Android UIAutomator](http://developer.android.com/tools/help/uiautomator/index.html) - [UiSelector.java](https://android.googlesource.com/platform/frameworks/testing/+/master/uiautomator/library/src/com/android/uiautomator/core/UiSelector.java) - [Ruby selenium-webdriver](http://selenium.googlecode.com/svn/trunk/docs/api/rb/index.html) - [Appium](https://github.com/appium/appium/blob/master/README.md) - [Appium extension](https://github.com/appium/appium/wiki/Automating-mobile-gestures) - [mechanic names of elements](https://github.com/jaykz52/mechanic/blob/8c490e1d225f384847e47ffdafb47cc2248bb96c/src/mechanic-core.js#L28) - [All methods supported by Appium](https://github.com/appium/appium/wiki/JSON-Wire-Protocol:-Supported-Methods) - [Appium's mobile gesture docs](https://github.com/appium/appium/wiki/Automating-mobile-gestures) -- Example use of Appium's mobile gesture. > @driver.execute_script 'mobile: tap', :x => 0, :y => 500 `console.rb` uses some code from [simple_test.rb]( https://github.com/appium/appium/blob/82995f47408530c80c3376f4e07a1f649d96ba22/sample-code/examples/ruby/simple_test.rb) and is released under the [same license](https://github.com/appium/appium/blob/c58eeb66f2d6fa3b9a89d188a2e657cca7cb300f/LICENSE) as Appium. The [Accessibility Inspector](https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/iPhoneAccessibility/Testing_Accessibility/Testing_Accessibility.html) is helpful for discovering button names and textfield values. -- Tag Name | UIA --:|:-- button | UIAButton textfield | UIATextField secure | UIASecureTextField text | UIAStaticText -- #### generic - `source` Prints a JSON view of the current page. - `page` Prints the content descriptions and text values on the current page. - `(Element) find(value)` Returns the first element that contains value. - `(Element) finds(value)` Returns all elements containing value (iOS only for now). - `(Element) name(name)` Returns the first element containing name. Android name is the content description. iOS uses accessibility label with a fallback to text. - `(Array) names(name)` Returns all elements containing name. - `(Element) text(text)` Returns the first element containing text. - `(Array) texts(text)` Returns all elements containing text. -- #### alert 0. `(void) alert_accept` Accept the alert. 0. `(String) alert_accept_text` Get the text of the alert's accept button. 0. `(void) alert_click(value)` iOS only Tap the alert button identified by value. 0. `(void) alert_dismiss` Dismiss the alert. 0. `(String) alert_dismiss_text` Get the text of the alert's dismiss button. 0. `(String) alert_text` Get the alert message text. #### button 0. `(Button) button(index)` Find a button by index. 0. `(Button) button(text, number = 0)` Find a button by text and optionally number. 0. `(Button) button_include(text)` Get the first button that includes text. 0. `(Array, Array) buttons(text = nil)` Get an array of button texts or button elements if text is provided. 0. `(Array