SciSharp / BotSharp

The AI Agent Framework in .NET
https://botsharp.readthedocs.io
Apache License 2.0
2.04k stars 422 forks source link

Web Driver is failing to do basic things #268

Closed abdulrafayadvany closed 4 months ago

abdulrafayadvany commented 4 months ago

Hey,

When I ask agent to search from google it give me this error "Target page, context or browser has been closed Call log: - waiting for Locator("textarea").Nth(6)". Upon deeper inspection I found that playwright isn't click on the textarea when you open Google.com.

Upon further inspection I found that "html_parser" is not giving the right index of textarea somehow and is giving the wrong index number.

Kindly check if it also happing to you guys also.

image

Oceania2018 commented 4 months ago

This WebDriver is desinged by general purpose, so it's not finetued/ trained/ RAG by how to use Playwright to input text in Google website. So you have to tell WebDrive as much detail steps as possible. I fixed some code issue. and below is the prompt example: image

The words search box in the prompt of input "BotSharp" in search box. is playing the magic and is telling WebDrive where the input box is located.

abdulrafayadvany commented 4 months ago

Thanks for the help @Oceania2018