Skip to content

Commit

Permalink
PR merge, add print of view hierarchy when test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
talkol committed Oct 8, 2016
1 parent 97cf0b5 commit 45a9c19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions detox/ios/Detox/TestFailureHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ @implementation TestFailureHandler
- (void)handleException:(GREYFrameworkException *)exception details:(NSString *)details
{
NSLog(@"Detox Test Failed: %@", details);

UIWindow* window = [[UIApplication sharedApplication] keyWindow];
NSLog(@"UI Hierarchy on test failure: %@", [GREYElementHierarchy hierarchyStringForElement:window]);

if (self.delegate) [self.delegate onTestFailed:details];
}

Expand Down

0 comments on commit 45a9c19

Please sign in to comment.