Skip to content

Instantly share code, notes, and snippets.

View rajkanth's full-sized avatar

Rajkanth rajkanth

View GitHub Profile
@rajkanth
rajkanth / XCUIDetailedError.swift
Created May 23, 2025 13:25
Adds value to the error report
import XCTest
// App instance
let app = XCUIApplication()
class BaseXCTestCase: XCTestCase {
// setUpWithError() and tearDownWithError() goes here
import XCTest
// App instances
let app = XCUIApplication()
let springBoardApp = XCUIApplication(bundleIdentifier: "com.apple.springboard")
// MARK: -
let alertsHandler = AlertsHandler()
@rajkanth
rajkanth / XCUIActivity.swift
Created May 15, 2025 20:36
Custom activity methods to beautify the reports
import XCTest
let app = XCUIApplication()
final class FrutaiOSUITests: XCTestCase {
override func setUpWithError() throws {
continueAfterFailure = false
}
@rajkanth
rajkanth / XCUITap.swift
Created May 15, 2025 12:27
Custom XCUITest tap
import XCTest
/// Reference to the main app under test.
let app = XCUIApplication()
/// Enum representing various interaction strategies for tapping UI elements.
enum HitModes {
/// Tap immediately without waiting for the element to appear.
case noWait