Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCODE 8 xcuitest code generation compilation error

Tags:

xctest

I have downloaded the xcode 8, and tried to record a test in xcuitest

but the generated code by xcode gives compilation error

Generated code

window.tables.children(matching: .tableRow).element(boundBy: 0).children(matching: .cell).element(boundBy: 5).click()

Error but it is giving compilation error like Value of type 'XCUIElementQuery' has no member ‘containing’ 'XCUIElementQuery' has no member ‘ children’ 'XCUIElementQuery' has no member ‘ matching’ 'XCUIElementQuery' has no member ‘ element'

also .other should be changed to .Other .cell should be changed to .Cell to fix the error

i selected swift 2.3 while installing xcode 8

Any help appreciated

like image 909
Vijayakumar Kb Avatar asked Oct 30 '22 20:10

Vijayakumar Kb


1 Answers

It looks like the code generator migrated to a new sytnax for the call to the children, but not the code interpreter. Replace .children(matching: .cell) with childrenMatchingType(.Cell)

like image 179
Nate Birkholz Avatar answered Dec 31 '22 03:12

Nate Birkholz