Skip to content

Commit

Permalink
Returned the previous accessibility result fields, changed the snapsh…
Browse files Browse the repository at this point in the history
…ot receiving method
  • Loading branch information
IlyaUA committed Nov 10, 2023
1 parent 1384f3c commit 152e9de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,16 @@ - (BOOL)fb_dismissKeyboardWithKeyNames:(nullable NSArray<NSString *> *)keyNames
if (nil != auditTypeValue) {
auditType = valuesToNamesMap[auditTypeValue] ?: [auditTypeValue stringValue];
}
id<FBXCElementSnapshot> snapshot = [extractIssueProperty(issue, @"element") lastSnapshot];
NSDictionary *element = snapshot ? [self.class dictionaryForElement:snapshot recursive:NO] : @{};
id<FBXCElementSnapshot> snapshot = [extractIssueProperty(issue, @"element") fb_takeSnapshot];
NSDictionary *elementObject = snapshot ? [self.class dictionaryForElement:snapshot recursive:NO] : @{};

[resultArray addObject:@{
@"detailedDescription": extractIssueProperty(issue, @"detailedDescription") ?: @"",
@"compactDescription": extractIssueProperty(issue, @"compactDescription") ?: @"",
@"auditType": auditType,
@"element": element ?: @{},
@"element": [extractIssueProperty(issue, @"element") description] ?: @"",
@"elementDescription": [extractIssueProperty(issue, @"element") debugDescription] ?: @"",
@"elementObject": elementObject ?: @{},
}];
return YES;
};
Expand Down

0 comments on commit 152e9de

Please sign in to comment.