channel-worker 1.1.5 → 1.1.6
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.
- package/lib/command-poller.js +2 -2
- package/package.json +1 -1
package/lib/command-poller.js
CHANGED
|
@@ -631,7 +631,7 @@ class CommandPoller {
|
|
|
631
631
|
}
|
|
632
632
|
if (!el) return null;
|
|
633
633
|
const rect = el.getBoundingClientRect();
|
|
634
|
-
return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };
|
|
634
|
+
return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2, tag: el.tagName, aria: (el.getAttribute('aria-label') || '').substring(0, 50), text: (el.textContent || '').trim().substring(0, 30) };
|
|
635
635
|
})()
|
|
636
636
|
`,
|
|
637
637
|
returnByValue: true,
|
|
@@ -643,7 +643,7 @@ class CommandPoller {
|
|
|
643
643
|
// Click with mouse
|
|
644
644
|
await send('Input.dispatchMouseEvent', { type: 'mousePressed', x: pos.x, y: pos.y, button: 'left', clickCount: 1 });
|
|
645
645
|
await send('Input.dispatchMouseEvent', { type: 'mouseReleased', x: pos.x, y: pos.y, button: 'left', clickCount: 1 });
|
|
646
|
-
console.log(`[commands] Mouse clicked
|
|
646
|
+
console.log(`[commands] Mouse clicked at (${pos.x}, ${pos.y}) — ${pos.tag} "${pos.aria}" "${pos.text}"`);
|
|
647
647
|
|
|
648
648
|
// Wait for file chooser
|
|
649
649
|
const chooserResult = await chooserPromise;
|