When we ran this code agent is not showing browser opened real step execution. Why agent fails? #243
bibinkunjumon2020
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
import asyncio
import os
import time
from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
from pydantic import BaseModel,Field
from mcp_use import MCPAgent, MCPClient
class StepResult(BaseModel):
js_code: str = Field(description="JavaScript code for the step for playwright test automation, the step should be based on accurate reliable selector and should be after sucessful action")
natural_language: str = Field(description="Natural language description of the step")
run_status: str = Field(description="step completion status. 'Passed' if the agent is able to take the step and get the code else 'Failed'")
async def main():
# Load environment variables
load_dotenv()
]
if name == "main":
asyncio.run(main())
Beta Was this translation helpful? Give feedback.
All reactions