Created
November 9, 2024 14:22
-
-
Save delasign/d2323fcd5ee0447459f5079bd74b713c to your computer and use it in GitHub Desktop.
Code for automating search in an NSOpenPanel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let openPanel = XCUIApplication().dialogs["open-panel"] | |
XCTAssertTrue(openPanel.exists, "Open Panel is visible.") | |
XCTAssertTrue(openPanel.isHittable, "Open Panel is hittable.") | |
let openPanelSearchBox = openPanel.searchFields.firstMatch | |
XCTAssertTrue(openPanelSearchBox.exists, "Open Panel Search Box is visible.") | |
XCTAssertTrue(openPanelSearchBox.isHittable, "Open Panel Search Box hittable.") | |
openPanelSearchBox.tap() | |
openPanelSearchBox.typeText("SEARCH_TEXT") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment