Sequence

public extension Sequence where Element: PrettyRawRepresentable
  • get the elements which match with identifiers and predicates limited in timeout

    Declaration

    Swift

    func elements(predicates: [EasyPredicate], logic: NSCompoundPredicate.LogicalType, timeout: Int) -> [XCUIElement]

    Parameters

    predicates

    as the match rules

    logic

    relation of predicates

    timeout

    if timeout == 0, return the elements immediately otherwise retry until timeout

    Return Value

    get the elements

  • get the first element was matched predicate

    Declaration

    Swift

    func anyElement(predicate: EasyPredicate) -> XCUIElement?
  • get the elements which match with identifiers and predicates limited in timeout

    Declaration

    Swift

    func elements(predicates: [EasyPredicate], logic: NSCompoundPredicate.LogicalType, timeout: Int) -> [XCUIElement]

    Parameters

    predicates

    as the match rules

    logic

    relation of predicates

    timeout

    if timeout == 0, return the elements immediately otherwise retry until timeout

    Return Value

    get the elements

  • get the first element was matched predicate

    Declaration

    Swift

    func anyElement(predicate: EasyPredicate) -> XCUIElement?
  • get the elements which match with identifiers and predicates limited in timeout

    Declaration

    Swift

    func elements(predicates: [EasyPredicate], logic: NSCompoundPredicate.LogicalType, timeout: Int) -> [Element]

    Parameters

    predicates

    predicates as the match rules

    logic

    relation of predicates

    timeout

    if timeout == 0, return the elements immediately otherwise retry until timeout

    Return Value

    get the elements

  • get the first element was matched predicate

    Declaration

    Swift

    func anyElement(predicate: EasyPredicate) -> Element?
  • convert EasyPredicates to NSCompoundPredicate

    Declaration

    Swift

    func toPredicate(_ logic: NSCompoundPredicate.LogicalType) -> NSCompoundPredicate
  • merged all EasyPredicate as one

    Declaration

    Swift

    func merged(withLogic logic: NSCompoundPredicate.LogicalType = .and) -> EasyPredicate

    Parameters

    logic

    all EasyPredicate relate rule

    Return Value

    new EasyPredicate