@@ -458,16 +458,23 @@ function NodeDetails({
458458 node : AccessibilityNode ;
459459 selectedSimulator : SimulatorMetadata | null ;
460460} ) {
461+ const isAndroid = isAndroidSimulator ( selectedSimulator ) ;
461462 const details = [
462463 [ "Type" , accessibilityKind ( node ) ] ,
463464 [ "Label" , primaryAccessibilityText ( node ) ] ,
464465 [ "Source" , sourceLocationText ( node ) ] ,
465- [ "Identifier" , accessibilityIdentifier ( node ) ] ,
466+ [
467+ isAndroid ? "Resource ID" : "Identifier" ,
468+ isAndroid
469+ ? ( node . androidResourceId ?? "" )
470+ : accessibilityIdentifier ( node ) ,
471+ ] ,
466472 [ "Inspector ID" , node . inspectorId ?? "" ] ,
467473 [ "Module" , node . moduleName ?? "" ] ,
468474 [ "NativeScript" , nativeScriptDescription ( node . nativeScript ) ] ,
469475 [ "React Native" , reactNativeDescription ( node . reactNative ) ] ,
470- [ "UIKit Class" , node . className ?? "" ] ,
476+ [ isAndroid ? "Android Class" : "UIKit Class" , node . className ?? "" ] ,
477+ [ "Package" , isAndroid ? ( node . androidPackage ?? "" ) : "" ] ,
471478 [ "Last JS" , lastUIKitScriptText ( node ) ] ,
472479 [ "Value" , node . AXValue ?? "" ] ,
473480 [ "Role" , node . role ?? "" ] ,
@@ -476,6 +483,15 @@ function NodeDetails({
476483 [ "SwiftUI" , swiftUIDescription ( node . swiftUI ) ] ,
477484 [ "Enabled" , node . enabled == null ? "" : node . enabled ? "true" : "false" ] ,
478485 [ "Hidden" , node . isHidden == null ? "" : node . isHidden ? "true" : "false" ] ,
486+ [ "Clickable" , boolDetail ( isAndroid , node . clickable ) ] ,
487+ [ "Long Clickable" , boolDetail ( isAndroid , node . longClickable ) ] ,
488+ [ "Focusable" , boolDetail ( isAndroid , node . focusable ) ] ,
489+ [ "Focused" , boolDetail ( isAndroid , node . focused ) ] ,
490+ [ "Scrollable" , boolDetail ( isAndroid , node . scrollable ) ] ,
491+ [ "Checkable" , boolDetail ( isAndroid , node . checkable ) ] ,
492+ [ "Checked" , boolDetail ( isAndroid , node . checked ) ] ,
493+ [ "Selected" , boolDetail ( isAndroid , node . selected ) ] ,
494+ [ "Password" , boolDetail ( isAndroid , node . password ) ] ,
479495 [ "Alpha" , node . alpha == null ? "" : String ( round ( node . alpha ) ) ] ,
480496 [ "Frame" , validFrame ( node . frame ) ? frameText ( node . frame ) : "" ] ,
481497 [ "PID" , node . pid == null ? "" : String ( node . pid ) ] ,
@@ -497,6 +513,18 @@ function NodeDetails({
497513 ) ;
498514}
499515
516+ function isAndroidSimulator ( simulator : SimulatorMetadata | null ) : boolean {
517+ return Boolean (
518+ simulator ?. platform === "android-emulator" ||
519+ simulator ?. deviceTypeIdentifier === "android-emulator" ||
520+ simulator ?. udid . startsWith ( "android:" ) ,
521+ ) ;
522+ }
523+
524+ function boolDetail ( include : boolean , value : boolean | null | undefined ) {
525+ return include && value != null ? ( value ? "true" : "false" ) : "" ;
526+ }
527+
500528function UIKitScriptEditor ( {
501529 node,
502530 selectedSimulator,
@@ -729,6 +757,7 @@ const HIERARCHY_SOURCE_ORDER: AccessibilitySource[] = [
729757 "react-native" ,
730758 "swiftui" ,
731759 "in-app-inspector" ,
760+ "android-uiautomator" ,
732761 "native-ax" ,
733762] ;
734763
@@ -759,6 +788,9 @@ function sourceLabel(source: AccessibilitySource): string {
759788 if ( source === "swiftui" ) {
760789 return "SwiftUI" ;
761790 }
791+ if ( source === "android-uiautomator" ) {
792+ return "Android" ;
793+ }
762794 return source === "in-app-inspector" ? "UIKit" : "Native AX" ;
763795}
764796
0 commit comments