Skip to content

Commit c85ca84

Browse files
committed
remove handle to get node name
1 parent cd0eef6 commit c85ca84

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/McpContext.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,9 @@ export class McpContext implements Context {
342342
// The AXNode for an option doesn't contain its `value`.
343343
// Therefore, set text content of the option as value.
344344
if (node.role === 'option') {
345-
const handle = await node.elementHandle();
346-
if (handle) {
347-
const textContentHandle = await handle.getProperty('textContent');
348-
const optionText = await textContentHandle.jsonValue();
349-
if (optionText) {
350-
nodeWithId.value = optionText.toString();
351-
}
345+
const optionText = node.name;
346+
if (optionText) {
347+
nodeWithId.value = optionText.toString();
352348
}
353349
}
354350

0 commit comments

Comments
 (0)