я новичок в xcode-ui и у меня есть одна проблема.
Assertion Failure: UI Testing Failure - Neither element nor any descendant has keyboard focus. Element:
Attributes: Other 0x7f8c1cb703d0: traits: 8589934592, {{0.0, 167.0}, {375.0, 44.0}}, label: 'XXXXXXX'
Element subtree:
→Other 0x7f8c1cb703d0: traits: 8589934592, {{0.0, 167.0}, {375.0, 44.0}}, label: 'XXXXXXX'
Path to element:
→Application 0x7f8c1cb71870: {{0.0, 0.0}, {375.0, 667.0}}, label: 'A'
↳Window 0x7f8c1cb78850: Main Window, {{0.0, 0.0}, {375.0, 667.0}}
↳Other 0x7f8c1cb77470: {{0.0, 0.0}, {375.0, 667.0}}
↳Other 0x7f8c1cb68100: traits: 8589934592, {{0.0, 0.0}, {375.0, 667.0}}
↳Other 0x7f8c1cb62260: traits: 8589934592, {{0.0, 0.0}, {375.0, }}
↳Other 0x7f8c1cd44e20: traits: 8589934592, {{0.0, 0.0}, {375.0,}}
↳Other 0x7f8c1cd45580: traits: 8589934592, {{0.0, 0.0}, {375.0,}}
↳Other 0x7f8c1cb63040: traits: 8589934592, {{0.0, 0.0}, {375.0,}}
↳ScrollView 0x7f8c1cb60e80: traits: 8589934592, {{0.0, 0.0},
↳Other 0x7f8c1cb73fc0: traits: 8589934592, {{0.0, 64.0}, {375.0}}
↳Other 0x7f8c1cb73930: traits: 8589934592, {{0.0, 124.0},
↳Other 0x7f8c1cb703d0: traits: 8589934592, label: 'XXXXXXXX'
Query chain:
→Find: Target Application 0x7f8c19c46190
Output: {
Application 0x7f8c1cb71870: {{0.0, 0.0}, {375.0, 667.0}}, label: 'App'
}
↪︎Find: Descendants matching type ScrollView
Output: {
ScrollView 0x7f8c1cb60e80: traits: 8589934592, {{0.0, 0.0}, {375.0,}}
}
↪︎Find: Descendants matching type Other
Output: {
Other 0x7f8c1cb7bb90: traits: 8589934592, {{0.0, 124.0}, {375.0,
Other 0x7f8c1cc55950: traits: 8589934592, {{0.0, 168.0}, {375.0,
Other 0x7f8c1cc55270: traits: 8589934592, {{0.0, 124.0}, {375.0,
Other 0x7f8c1cb74650: traits: 8589934592, {{0.0, 124.0}, {375.0, 44.0}}, label: 'XXXXXXXX'
Other 0x7f8c1cb703d0: traits: 8589934592, {{0.0, 167.0}, {375.0, 44.0}}, label: 'XXXXXXXX'
Я записал тест и воспроизвел его, но это сработало. Вот код:
let elementsQuery = app.scrollViews.otherElements
let a = elementsQuery.otherElements["XXXXXXXXX"]
a.tap()
app.typeText("rerererdre")
let b = elementsQuery.otherElements["YYYYYYYYY"]
b.tap()
Сбой теста после ввода текста в поле a. a и b - два текстовых поля в прокрутке. Я попробовал это с помощью app.textFields["XXXXXXXXX"], но это не сработало.
Любые идеи? Ваше здоровье
"Подключить аппаратную клавиатуру" выключен.
User Interaction Enabled
иAccessibility
в Интерфейсном Разработчике. Где текстовое поле имеет вашу строку"XXXXXX"
? В собственностиAccessibility Identifier
или где-то в другом месте? - person Cemen   schedule 16.01.2016