XCUIElement

  • Declaration

    Swift

    @discardableResult
    func waitUntil(predicate: EasyPredicate, timeout: TimeInterval = 10, handler: XCTNSPredicateExpectation.Handler? = nil) -> (result: XCTWaiter.Result, element: XCUIElement)
  • Declaration

    Swift

    @discardableResult
    func waitUntilExists(timeout: TimeInterval = 10) -> (result: XCTWaiter.Result, element: XCUIElement)
  • Declaration

    Swift

    @discardableResult
    func waitUntilExistsAssert(timeout: TimeInterval = 10) -> XCUIElement
  • Declaration

    Swift

    @discardableResult
    func wait(_ s: UInt32 = 1) -> XCUIElement
  • get the results in the descendants which matching the EasyPredicates

    Declaration

    Swift

    @discardableResult
    func descendants(predicates: [EasyPredicate], logic: NSCompoundPredicate.LogicalType = .and) -> XCUIElementQuery

    Parameters

    predicates

    EasyPredicate’s rules

    logic

    rule’s relate

    Return Value

    result target

  • Declaration

    Swift

    @discardableResult
    func descendants(predicate: EasyPredicate) -> XCUIElementQuery
  • Returns a query for direct children of the element matching with EasyPredicates

    Declaration

    Swift

    @discardableResult
    func children(predicates: [EasyPredicate], logic: NSCompoundPredicate.LogicalType = .and) -> XCUIElementQuery

    Parameters

    predicates

    EasyPredicate rules

    logic

    rules relate

    Return Value

    result query

  • Declaration

    Swift

    @discardableResult
    func children(predicate: EasyPredicate) -> XCUIElementQuery
  • Wait until it’s available and then type a text into it.

    Declaration

    Swift

    @discardableResult
    func tapAndType(text: String, timeout: TimeInterval = 10) -> XCUIElement
  • Wait until it’s available and clear the text, then type a text into it.

    Declaration

    Swift

    @discardableResult
    func clearAndType(text: String, timeout: TimeInterval = 10) -> XCUIElement
  • hiden Keyboard, especial when you finished typ text to go next step

    Declaration

    Swift

    @discardableResult
    func hidenKeyboard(inApp: XCUIApplication? = nil) -> XCUIElement

    Return Value

    self

  • set switch on or off if is not switch element, then assert fail

    Declaration

    Swift

    @discardableResult
    func setSwitch(on: Bool, timeout: TimeInterval = 10) -> XCUIElement

    Parameters

    on

    on or off

    timeout

    wait Until Exists

    Return Value

    self

  • some elemnt is exists but can not tap

    Declaration

    Swift

    @discardableResult
    func forceTap(timeout: TimeInterval = 10) -> XCUIElement

    Parameters

    timeout

    wait Until enable

    Return Value

    self

  • tap If Exists

    Declaration

    Swift

    @discardableResult
    func tapIfExists(timeout: TimeInterval = 10) -> XCUIElement

    Parameters

    timeout

    wait Until enable

    Return Value

    self