Open danni-z-loggia opened 2 hours ago
click('67')
Entering get_elem_by_bid with bid: 67
Current frame: <Page url='https://www.amazon.com/'>
Locating final element with bid: 67
Element found: <Locator frame=<Frame name= url='https://www.amazon.com/'> selector='internal:testid=[data-unique-test-id="67"s]'>
done extracting element
Attempting to click element with bid: 67
Attempt 1 of 3
Locating element
Entering get_elem_by_bid with bid: 67
Current frame: <Page url='https://www.amazon.com/'>
Locating final element with bid: 67
Element found: <Locator frame=<Frame name= url='https://www.amazon.com/'> selector='internal:testid=[data-unique-test-id="67"s]'>
Element found: <Locator frame=<Frame name= url='https://www.amazon.com/'> selector='internal:testid=[data-unique-test-id="67"s]'>
Checking if element is clickable
Element is clickable
Adding demo mode effects
Demo mode effects added
Performing click with timeout 30000ms
Click performed successfully
Timeout error on attempt 1: Timeout 30000ms exceeded.
=========================== logs ===========================
"domcontentloaded" event fired
"load" event fired
============================================================
Traceback (most recent call last):
File "<string>", line 425, in click
File "/Users/danqingzhang/Desktop/LiteWebAgent/venv/lib/python3.11/site-packages/playwright/sync_api/_generated.py", line 9412, in wait_for_load_state
self._sync(self._impl_obj.wait_for_load_state(state=state, timeout=timeout))
File "/Users/danqingzhang/Desktop/LiteWebAgent/venv/lib/python3.11/site-packages/playwright/_impl/_sync_base.py", line 109, in _sync
return task.result()
^^^^^^^^^^^^^
File "/Users/danqingzhang/Desktop/LiteWebAgent/venv/lib/python3.11/site-packages/playwright/_impl/_page.py", line 489, in wait_for_load_state
return await self._main_frame.wait_for_load_state(**locals_to_params(locals()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danqingzhang/Desktop/LiteWebAgent/venv/lib/python3.11/site-packages/playwright/_impl/_frame.py", line 236, in wait_for_load_state
return await self._wait_for_load_state_impl(state, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danqingzhang/Desktop/LiteWebAgent/venv/lib/python3.11/site-packages/playwright/_impl/_frame.py", line 264, in _wait_for_load_state_impl
await wait_helper.result()
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
"domcontentloaded" event fired
"load" event fired
============================================================
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/danqingzhang/Desktop/LiteWebAgent/prompting_main.py", line 44, in <module>
main(args)
File "/Users/danqingzhang/Desktop/LiteWebAgent/prompting_main.py", line 19, in main
response = agent.send_prompt(args.plan)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danqingzhang/Desktop/LiteWebAgent/litewebagent/agents/PromptAgents/PromptAgent.py", line 21, in send_prompt
trajectory = self.send_completion_request(plan, 0, [])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danqingzhang/Desktop/LiteWebAgent/litewebagent/agents/PromptAgents/PromptAgent.py", line 84, in send_completion_request
return self.send_completion_request(plan, depth + 1, trajectory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danqingzhang/Desktop/LiteWebAgent/litewebagent/agents/PromptAgents/PromptAgent.py", line 65, in send_completion_request
execute_action(next_action, self.action_set, page, context, self.goal, page_info['interactive_elements'],
File "/Users/danqingzhang/Desktop/LiteWebAgent/litewebagent/action/utils.py", line 29, in execute_action
execute_python_code(
File "/Users/danqingzhang/Desktop/LiteWebAgent/litewebagent/action/base.py", line 63, in execute_python_code
exec(code, globals)
File "<string>", line 760, in <module>
File "<string>", line 432, in click
TypeError: 'str' object is not callable