2017-02-28 10 views

答えて

2

アプリのコードの各ボタンにaccessibilityIdentifierを追加し、テストでそのボタンの識別子を使用して各ボタンにアクセスして区別します。アクセシビリティ識別子は、アクセシビリティユーザであっても、ユーザには向いていません。したがって、ユーザエクスペリエンスには影響しません。

// app code 
buttonA.accessibilityIdentifier = "buttonA" 
buttonB.accessibilityIdentifier = "buttonB" 

// test code 
let app = XCUIApplication() 
let buttonA = app.buttons["buttonA"] 
let buttonB = app.buttons["buttonB"] 
関連する問題