MCPcopy Create free account
hub / github.com/callstack/agent-device / button

Function button

src/platforms/android/__tests__/alert-detection.test.ts:80–98  ·  view source on GitHub ↗
(
  index: number,
  label: string,
  identifier: string,
  origin: { x: number; y: number },
  permission = false,
  parentIndex = 0,
)

Source from the content-addressed store, hash-verified

78}
79
80function button(
81 index: number,
82 label: string,
83 identifier: string,
84 origin: { x: number; y: number },
85 permission = false,
86 parentIndex = 0,
87): RawSnapshotNode {
88 const packageName = permission ? 'com.google.android.permissioncontroller' : 'com.example.app';
89 const id = permission ? `com.android.permissioncontroller:id/${identifier}` : identifier;
90 return node(index, 'android.widget.Button', {
91 label,
92 identifier: id,
93 bundleId: packageName,
94 parentIndex,
95 rect: { ...origin, width: 128, height: 52 },
96 hittable: true,
97 });
98}

Callers 1

Calls 1

nodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…