StepContext

public struct StepContext

The context model passed to all step definition handlers

  • A reference to the active XCUIApplication instance. It isn’t required to activate it in code as it should already be launched and active by the time the step is running.

    Declaration

    Swift

    public let application: XCUIApplication
  • A list of all matches produced from matching the Gherkin step to the current step definition.

    Declaration

    Swift

    public let matches: [Regex.Match]
  • A list of all arguments produced from either associated data tables, doc strings, or step argument transforms present in the step.

    Declaration

    Swift

    public let arguments: [Argument]
  • Pending expectations to wait for before continuing

    Declaration

    Swift

    public var expectations: [XCTestExpectation]
  • Mark current step’s Step.status as StepStatus.pending and skip all subsequent steps. Use in place of a notYetImplemented throw.

    Declaration

    Swift

    public func pending()
  • Call a step directly by pattern (not yet implemented)

    Declaration

    Swift

    public func step(_ pattern: String)
  • Call a step directly by pattern (not yet implemented)

    Declaration

    Swift

    public func step(_ pattern: Regex)