Common UI Elements for iOS Apps


Given below are the most common Element types available for iOS:

Element Type Description Common Attributes
XCUIElementTypeTextField Used for input text fields such as username, email, and name value, text, name
XCUIElementTypeSecureTextField Used for password input fields which hide the entered text value, text, name
XCUIElementTypeButton Used for showing buttons text, name
XCUIElementTypeSwitch Used mostly for toggle switch value, text, name
XCUIElementTypePickerWheel Used for showing selector such as country selector, date selector or any selector to select from given options name
XCUIElementTypeSlider Used for showing a slider element which can be slided horizontally such as brightness, volume slider name
XCUIElementTypeImage Used for showing images name
XCUIElementTypeSearchField Used for showing search fields value, text, name
XCUIElementTypeLink Used for showing hyperlinks value, text, name
XCUIElementTypeDatePicker User for showing date picker elements value, text, name

Some other less common element types are:

  • XCUIElementTypeActivityIndicator
  • XCUIElementTypeProgressIndicator
  • XCUIElementTypeAlert
  • XCUIElementTypeWindow
  • XCUIElementTypeOther
  • XCUIElementTypeStaticText
  • XCUIElementTypeNavigationBar
  • XCUIElementTypeSegmentedControl
  • XCUIElementTypeMap
  • XCUIElementTypeStatusBar