storyboard.the UtilitiesIdentity InspectoraddButton)
storyboard.the UtilitiesIdentity InspectorUser Defined Runtime AttributesKey Path type - accessibilityIdentifierType - `StringValue - new accessibility identifier for your element (in example view)
import XCTest
class StackOverFlowUITests: XCTestCase {
private let app = XCUIApplication()
//Views
private var view: XCUIElement!
//Buttons
private var addButton: XCUIElement!
override func setUp() {
super.setUp()
app.launch()
//Views
view = app.otherElements["view"]
//Buttons
addButton = app.buttons["addButton"]
}
func testMyApp() {
addButton.tap()
view.tap()
}
}
In `` add Accessibility Identifier for element.