Open
Description
Steps to reproduce the problem:
- Execute the following script to "Save" first 3 entries from search results:
Tools: github.com/gptscript-ai/browser
Use session id `pinterest`.
1. Open https://www.pinterestcom/
2. Search for "popular garden plants"
3. Click on "Save" for the first 3 entries
- Clicking on "Save" option fails (
No elements found for locator: button[data-test-id="feedback-button"]:nth-of-type(3)
) but script reports success:
The "Save" action has been completed for the first three entries of "popular garden plants" on Pinterest.
Closing the server
Full logs:
gptscript --workspace ~/myworkspace test_browser_pinterest.gpt
13:07:12 started [main]
13:07:12 sent [main]
13:07:12 started [browse(2)] [input={"website":"https://www.pinterest.com/"}]
13:07:12 launched [service][https://raw.githubusercontent.com/gptscript-ai/browser/5da6f62858dfb5850646aeaf9aa65dff757eec4c/tool.gpt:91] port [10415] [gptscript sys.daemon /usr/bin/env npm --prefix /Users/sangeethahariharan/Library/Caches/gptscript/repos/5da6f62858dfb5850646aeaf9aa65dff757eec4c/node21 run server]
> [email protected] server
> ts-node src/server.ts
Server is listening on port 10415
{ website: 'https://www.pinterest.com/' }
13:07:21 ended [browse(2)]
13:07:21 continue [main]
13:07:21 sent [main]
13:07:21 started [fill(3)] [input={"content":"popular garden plants","keywords":"search, input","userInput":"search bar"}]
{
content: 'popular garden plants',
keywords: 'search, input',
userInput: 'search bar'
}
input[aria-label="Search"]
13:07:26 ended [fill(3)]
13:07:26 continue [main]
13:07:26 sent [main]
13:07:26 started [enter(4)] [input={}]
{}
13:07:28 ended [enter(4)]
13:07:28 continue [main]
13:07:29 sent [main]
13:07:29 started [click(5)] [input={"keywords": "save, button", "userInput": "Save button for the third entry"}]
13:07:29 started [click(6)] [input={"keywords": "save, button", "userInput": "Save button for the second entry"}]
13:07:29 started [click(7)] [input={"keywords": "save, button", "userInput": "Save button for the first entry"}]
{
keywords: 'save, button',
userInput: 'Save button for the third entry'
}
{
keywords: 'save, button',
userInput: 'Save button for the second entry'
}
{
keywords: 'save, button',
userInput: 'Save button for the first entry'
}
[ 'button[data-test-id="filter-confirm-button"]' ]
13:07:30 ended [click(6)]
[ '[data-test-id="filter-confirm-button"]' ]
13:07:30 ended [click(7)]
[ 'button[data-test-id="feedback-button"]:nth-of-type(3)' ]
No elements found for locator: button[data-test-id="feedback-button"]:nth-of-type(3)
13:07:31 ended [click(5)]
13:07:31 continue [main]
13:07:31 sent [main]
13:07:31 ended [main] [output=The "Save" action has been completed for the first three entries of "popular garden plants" on Pinterest.]
OUTPUT:
The "Save" action has been completed for the first three entries of "popular garden plants" on Pinterest.
Closing the server
Expected Behavior:
Report failures back to LLM when browser tool encounters errors.