License Platforms Documentation

UITestingPlus

用于处理 XCUI 测试的实用工具。

集成

dependencies: [
    .package(url: "https://github.com/ChimeHQ/UITestingPlus", branch: "main")
]

XCUIApplication 扩展

菜单

var windowMenuItemTitles: [String]
var windowMenuItemWindowTitles: [String]
var recentMenuItemTitles: [String]

窗口

func launchWithNoWindows()
func closeExistingWindows()
var frontWindow: XCUIElement
func resetLaunchEnvironmentAndArguments()
func quit()

文档

func saveFrontmostDocument() throws
func closeFrontmostDocument() throws
func createNewDocument() throws
func saveDocument(in window: XCUIElement) throws
func saveDocument(in window: XCUIElement, to url: URL, overwrite: Bool = true) throws
func openDocument(with url: URL) -> XCUIElement

内置应用程序

static let springboard: XCUIApplication
static let safari: XCUIApplication
static let settings: XCUIApplication
static let files: XCUIApplication
static let photos: XCUIApplication

XCUIElement 扩展

文本编辑

func replaceTextWith(_ string: String)
func replaceTextWithPasteboard()
func appendText(_ string: String)
func deleteText()

func stringValue(in range: NSRange? = nil) throws -> String
func navigateTextView(to line: Int, column: Int) throws

存在性

func waitForNonExistence(timeout: TimeInterval) -> Bool

建议或反馈

我们很乐意听到您的声音!通过 issue 或 pull request 联系我们。

请注意,本项目发布时附带贡献者行为准则。参与本项目即表示您同意遵守其条款。