CopyPastor

Detecting plagiarism made easy.

Score: 2; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Reposted on 2025-07-10
by Asi Givati

Original Post

Original - Posted on 2025-07-10
by Asi Givati



            
Present in both answers; Present only in the new answer; Present only in the old answer;

``` extension XCUIApplication { var keyboard: XCUIElement? { let keyboard = keyboards.element(boundBy: 0) return (keyboard.exists && keyboard.isHittable) ? keyboard : nil } var isKeyboardVisible: Bool { keyboard != nil } var isKeyboardHidden: Bool { !isKeyboardVisible } func closeKeyboard() { guard let keyboard else { return } let hideKeyboardButton = keyboard.buttons["Hide keyboard"] if hideKeyboardButton.exists && hideKeyboardButton.isHittable { hideKeyboardButton.tap() } else { let firstKey = keys.element(boundBy: 0) if firstKey.exists { typeText("\n") } } } } ```
``` extension XCUIApplication { var keyboard: XCUIElement? { let keyboard = keyboards.element(boundBy: 0) return (keyboard.exists && keyboard.isHittable) ? keyboard : nil } var isKeyboardVisible: Bool { keyboard != nil } var isKeyboardHidden: Bool { !isKeyboardVisible } func closeKeyboard() { guard let keyboard else { return } let hideKeyboardButton = keyboard.buttons["Hide keyboard"] if hideKeyboardButton.exists && hideKeyboardButton.isHittable { hideKeyboardButton.tap() } else { let firstKey = keys.element(boundBy: 0) if firstKey.exists { typeText("\n") } } } } ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;