Skip to content

Conversation

@shadowusr
Copy link
Member

What's done?

  • Refactored element location API. Now it's a discriminated union with two available strategies.
  • Implemented a new waitFor tool, which allows agent to wait until some element appears or disappears.
  • navigate tool now uses openAndWait instead of url.
  • When testing-library query fails with "multiple elements found" error we no longer return the whole error message that includes unoptimized html markup. We return only the first line of the error which includes summary, e.g. "multiple elements with role button and name X were found"


await result.element.waitForDisplayed(waitOptions);

console.error(`Element with ${result.queryDescription} ${actionDescription} successfully`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.error?

${actionDescription} successfully

shouldn't it be in the past tense?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.error is used to output debug logs.

MCP servers have two ways of communication as of now — stdio and server sent events. we use stdio as a simple and effective way for a local server. In this case, communication with client is performed via stdout interface, so we can't do any console.logs. And stderr can be used for debug logging.

@shadowusr shadowusr merged commit bde02dd into master Jul 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants