https://github.com/ChimeHQ/UITestingPlus
Utilities for working with XCUI testing
https://github.com/ChimeHQ/UITestingPlus
macos swift uitesting xctest
Last synced: 3 months ago
JSON representation
Utilities for working with XCUI testing
- Host: GitHub
- URL: https://github.com/ChimeHQ/UITestingPlus
- Owner: ChimeHQ
- License: bsd-3-clause
- Created: 2022-10-12T13:17:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-25T17:19:02.000Z (about 2 years ago)
- Last Synced: 2024-11-29T01:25:28.749Z (10 months ago)
- Topics: macos, swift, uitesting, xctest
- Language: Swift
- Homepage:
- Size: 25.4 KB
- Stars: 39
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![License][license badge]][license]
[![Platforms][platforms badge]][platforms]
[![Documentation][documentation badge]][documentation]# UITestingPlus
Utilities for working with XCUI testing.## Integration
```swift
dependencies: [
.package(url: "https://github.com/ChimeHQ/UITestingPlus", branch: "main")
]
```## XCUIApplication Extensions
### Menus
```swift
var windowMenuItemTitles: [String]
var windowMenuItemWindowTitles: [String]
var recentMenuItemTitles: [String]
```### Windows
```swift
func launchWithNoWindows()
func closeExistingWindows()
var frontWindow: XCUIElement
func resetLaunchEnvironmentAndArguments()
func quit()
```### Documents
```swift
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
```### Built-in Applications
```swift
static let springboard: XCUIApplication
static let safari: XCUIApplication
static let settings: XCUIApplication
static let files: XCUIApplication
static let photos: XCUIApplication
```## XCUIElement Extensions
### Text Editing
```swift
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
```### Existance
```swift
func waitForNonExistence(timeout: TimeInterval) -> Bool
```## Classes
- `HittableElementExpectation`
## Suggestions or Feedback
We'd love to hear from you! Get in touch via an issue or pull request.
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
[license]: https://opensource.org/licenses/BSD-3-Clause
[license badge]: https://img.shields.io/github/license/ChimeHQ/UITestingPlus
[platforms]: https://swiftpackageindex.com/ChimeHQ/UITestingPlus
[platforms badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FChimeHQ%2FUITestingPlus%2Fbadge%3Ftype%3Dplatforms
[documentation]: https://swiftpackageindex.com/ChimeHQ/UITestingPlus/main/documentation
[documentation badge]: https://img.shields.io/badge/Documentation-DocC-blue