XCUI Swift SDK for LTApp
Note: We dont support XCTest as no UI is rendered for XCTest. We support only XCUI Test
Include the dependency in xcode package manager
- Right click on any item in
Project Navigator - Click
Add Packages... - Search top right with this repo URL
- Include package
- Go to your project properties -> select XCUI test project target
- Go to
Build Phasestab - Under
Target Dependenciespress+and selectSmartuiXcuidependency - Under
Link Library with Binariespress+and selectSmartuiXcuidependency
This is an example test using the screenshot function.
import XCTest
import SmartuiXcui // importing the package
final class MyAppUITests: XCTestCase {
func testExample() throws {
// launch application
let app = XCUIApplication()
app.launch()
// take screenshot
let ltApp = LTApp()
try ltApp.screenshot(name: "screenshotName")
}
}screenshot(name: String, customCropStatusBar: String = "", customCropNavigationBar: String = "")name(required) - The screenshot name; must be unique to each screenshotOptional fieldcustomCropStatusBarcustomCropNavigationBar