Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incomplete universal character name in UI Testing

I am using Xcode 7's new feature : UI Testing. After recording the interaction, Xcode generated the code automatically :

- (void)testDoubleTapToolBarItem {
    [[[XCUIApplication alloc] init].tabBars.buttons[@"\U5173\U6ce8"] doubleTap];
                                                    ~~~~~~~~~~~~~~~~
}

However, warning showed as well. Any one know how to fix this?

Incomplete universal character name


Edit: This seems to be a BUG since Xcode 7.0 GM

like image 559
Zigii Wong Avatar asked Sep 07 '15 06:09

Zigii Wong


2 Answers

You can use the following workaround as this seems to be a bug in xcode:

replace all \U to \u and it should work.

like image 69
Thorax Avatar answered Nov 02 '22 02:11

Thorax


I tried replace \U to \u but still got error "Expected hexadecimal code in braces after unicode escape", so have to add \u{you value here}, like collectionViewsQuery.buttons["\u{6ce8}\u{518c}"].tap()

See more at Expected hexadecimal code in braces after unicode escape

like image 33
Edward Chiang Avatar answered Nov 02 '22 02:11

Edward Chiang