@nbakka/mcp-appium 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/server.js +10 -9
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -146,18 +146,19 @@ const createMcpServer = () => {
146
146
  tool("mobile_list_elements_on_screen", "List elements on screen and their coordinates, with display text or accessibility label. Do not cache this result.", {}, async ({}) => {
147
147
  requireRobot();
148
148
  const elements = await robot.getElementsOnScreen();
149
+ console.log(elements)
149
150
  const result = elements.map(element => {
150
151
  const out = {
151
- type: element.type,
152
- text: element.text,
153
- label: element.label,
154
- name: element.name,
155
- value: element.value,
152
+ type: element.type || null,
153
+ text: element.text || null,
154
+ label: element.label || null,
155
+ name: element.name || null,
156
+ value: element.value || null,
156
157
  coordinates: {
157
- x: element.rect.x,
158
- y: element.rect.y,
159
- width: element.rect.width,
160
- height: element.rect.height,
158
+ x: element.rect.x || 0,
159
+ y: element.rect.y || 0,
160
+ width: element.rect.width || 0,
161
+ height: element.rect.height || 0,
161
162
  },
162
163
  };
163
164
  if (element.focused) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"