AccessibilityIdentifierProvider

public protocol AccessibilityIdentifierProvider : AnyObject

This object handles the identifer of the UI elements to test.

Example:

final class HomeAIP: AIP {
   static var mainIdentifier: String = "home"
}

extension HomeAIP {
    enum Element: String {
        case mainView
        case tableView
    }
}

  • Undocumented

    Declaration

    Swift

    associatedtype Element
  • The name of a specific container of UI elements. It could be a good idea using the name of the view of the UI elements like home.

    Declaration

    Swift

    static var mainIdentifier: String { get }
  • elementIdentifier(for:) Default implementation

    Helper method to provide the complete identifier of an UI element. You don’t need to implement it. An internal extension provides the expected behaviour.

    Default Implementation

    Declaration

    Swift

    static func elementIdentifier(for element: Element) -> String

    Parameters

    element

    UI Element which needs an identifier.

    Return Value

    The complete identifier of the UI element.