IdentifiableByElement

public protocol IdentifiableByElement

Protocol used to identify object, eg. PageObject, in the view hierarchy.

Example:

open class MainPage: BaseAppPage {
    open var tableView: XCUIElement {
        return view.tables["tableView"]
    }
}

extension MainPage: IdentifiableByElement {
    public var identifingElement: XCUIElement {
        return tableView
    }
}
  • Identifing XCUIElement.

    Declaration

    Swift

    var identifingElement: XCUIElement { get }