Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Classes/GlobalStateExplorers/FLEXWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ - (void)viewDidLoad {
self.webView.frame = self.view.bounds;
self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

// Set accessibility identifiers for automated testing
if ([self.title containsString:@"Request"]) {
self.webView.accessibilityIdentifier = @"network_request_body";
self.webView.accessibilityLabel = @"Request Body";
if (self.originalText.length > 0) {
self.webView.accessibilityValue = self.originalText;
}
} else if ([self.title containsString:@"Response"]) {
self.webView.accessibilityIdentifier = @"network_response_body";
self.webView.accessibilityLabel = @"Response Body";
if (self.originalText.length > 0) {
self.webView.accessibilityValue = self.originalText;
}
} else {
// Generic body content
self.webView.accessibilityIdentifier = @"network_body_content";
self.webView.accessibilityLabel = @"Network Body Content";
if (self.originalText.length > 0) {
self.webView.accessibilityValue = self.originalText;
}
}

if (self.originalText.length > 0) {
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithTitle:@"Copy" style:UIBarButtonItemStylePlain target:self action:@selector(copyButtonTapped:)
Expand Down
3 changes: 3 additions & 0 deletions Classes/Network/FLEXNetworkMITMViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.backgroundColor = FLEXColor.primaryBackgroundColor;
}

// Add accessibility identifier for automated testing
cell.accessibilityIdentifier = [NSString stringWithFormat:@"network_call_%ld", (long)indexPath.row];

return cell;
}

Expand Down