Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

very slow going through the steps and the process ends with page screenshot timeout #23

Closed
samer-alisaleh opened this issue Mar 16, 2025 · 1 comment

Comments

@samer-alisaleh
Copy link

Hi,

Thanks for providing the code. Im trying to run it as is without any change but its been a struggle to get it to do anything right. Here are the steps I followed:

1- Download the repository as a zip package
2- Unzip
3- install the required packages
4- Open the code in VisualCode
5- I opened new terminal and typed the following command:

python cli.py --computer local-playwright
6- In the input prompt I typed the following task:

"go to cnn.com, find the main headline then summarize and print"

7- Chrome session was open to the Bing.com
8- The agent typed cnn.com in the search bar
9 - The page went to cnn.com - so far so good.
10- The agent seems to go off track where multiple browser sessions opened for cnn.com.
11- The loop seem to get stuck on different actions and repeat.
12- After few minutes of waiting and repeating, the code existed with the following error:


   raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.TimeoutError: Page.screenshot: Timeout 30000ms exceeded.
Call log:
  - taking page screenshot
  -   - waiting for fonts to load...
  -   - fonts loaded


Here is the full action taken by the agent as appeared in the terminal:

screenshot({})
click({'button': 'left', 'x': 451, 'y': 177})
keypress({'keys': ['CTRL', 'L']})
type({'text': 'cnn.com'})
keypress({'keys': ['ENTER']})
wait({})
click({'button': 'left', 'x': 459, 'y': 299})
wait({})
click({'button': 'left', 'x': 464, 'y': 300})
wait({})
click({'button': 'left', 'x': 356, 'y': 45})
keypress({'keys': ['CTRL', 'L']})
type({'text': 'cnn.com'})
keypress({'keys': ['CTRL', 'A']})
type({'text': 'cnn.com'})
keypress({'keys': ['CTRL', 'A']})
type({'text': 'cnn.com'})
click({'button': 'left', 'x': 372, 'y': 300})
wait({})
click({'button': 'left', 'x': 438, 'y': 38})
click({'button': 'left', 'x': 744, 'y': 48})
wait({})
click({'button': 'left', 'x': 379, 'y': 45})
click({'button': 'left', 'x': 743, 'y': 44})
keypress({'keys': ['CTRL', 'T']})
click({'button': 'left', 'x': 345, 'y': 48})
click({'button': 'left', 'x': 329, 'y': 49})
keypress({'keys': ['CTRL', 'A']})
type({'text': 'cnn.com'})
keypress({'keys': ['CTRL', 'A']})
click({'button': 'left', 'x': 403, 'y': 333})
wait({})
click({'button': 'wheel', 'x': 428, 'y': 298})
wait({})
click({'button': 'left', 'x': 374, 'y': 299})
wait({})
click({'button': 'wheel', 'x': 633, 'y': 297})
scroll({'x': 827, 'y': 211, 'scroll_x': 0, 'scroll_y': -367})
click({'button': 'left', 'x': 28, 'y': 56})
click({'button': 'left', 'x': 40, 'y': 73})
click({'button': 'wheel', 'x': 451, 'y': 297})

Total time between start to finish 10-15 minutes.

Not sure what I'm doing wrong. I appreciate your feedback and guidance.
Thanks

@katia-openai
Copy link
Collaborator

Sorry about this, it was probably linked to the issue fixed in #11 - the screenshot was actually returning content from the 1st page. Should work now!

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

No branches or pull requests

2 participants