When you need to answer simple yes/no questions—such as “Does the login form show an error?” or “Is a dialog displayed above the main application?”—you can use the agent.get() method with a boolean response schema.

This approach is useful for quickly checking the state of your application and making assertions in your tests.

Examples:

answer = agent.get("Is the page still loading?", response_schema=bool)
assert not answer, "The page should not be loading"
answer = agent.get("Does the page show a dialog window?", response_schema=bool)
assert not answer, "The main page should not show a dialog window"
answer = agent.get("Does the form show an error?", response_schema=bool)
assert not answer, "The form should not show an error"

Tip:
Use clear, unambiguous questions to ensure reliable yes/no answers from the agent.