UITestKitBase

open class UITestKitBase : TestKitBase

Undocumented

  • Should the pauseForUIDebug function actually pause? This variable is useful for when you want to watch a UI Run

    Declaration

    Swift

    open var shouldPauseUI: Bool
  • If shouldPauseUI is enabled, this is how long a pauseForUIDebug() call lasts (in seconds).

    Declaration

    Swift

    open var pauseTimer: TimeInterval
  • if pauseForUIDebug is enabled, then this will pause for pauseTimer seconds if not, then it is a no-op.

    Declaration

    Swift

    open func pauseForUIDebug()
  • Tells you the type of the top ViewController

    Declaration

    Swift

    open var topVCType: String { get }
  • Gets you the VC that is the currently visible VC (top)

    Declaration

    Swift

    open var topVC: UIViewController? { get }
  • Takes a screenshot and returns the filename that it wrote to (which contains the topVCType)

    Declaration

    Swift

    open var topVCScreenshot: String { get }
  • Gets you a reference to the TabBarVC for the app (so you can set what tab is visible, get the currently presented VC, etc)

    Declaration

    Swift

    open var tabBarVC: UITabBarController? { get }
  • Gets you the VC that is the currently visible VC (top)

    Declaration

    Swift

    open class var topVC: UIViewController? { get }
  • Traverses the provided rootViewController to find the currently visible view controller.

    Declaration

    Swift

    open class func getVisibleViewController(_ rootViewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController?

    Parameters

    rootViewController

    The root Viewcontroller to search.

    Return Value

    The currently visible ViewController if it could be determined.

  • Disables UI Animations

    Declaration

    Swift

    open func disableAnimations()
  • Enables UI Animations

    Declaration

    Swift

    open func enableAnimations()
  • Modally presents the provided view controller (without animations).

    Declaration

    Swift

    open func presentModally(viewController: UIViewController)

    Parameters

    viewController

    The view controller you want to present.