Commit Graph

45 Commits

Author SHA1 Message Date
yasithdev
8ea4b4c71a centralize playwright/patchwright imports, and update typing/checks to reduce lint errors 2025-06-16 22:57:20 -04:00
Magnus Müller
faa655e02c Fix typo in children count print statement in accessibility playground test
- Corrected a syntax error in the print statement that outputs the number of children nodes, ensuring proper formatting and clarity in the output.
2025-05-22 12:23:41 +02:00
Magnus Müller
bbd0b4cf4b Add accessibility playground script for testing accessibility trees
- Introduced a new script `test_accessibility_playground.py` that launches a browser and navigates to a specified URL to extract and print the accessibility tree.
- Implemented functionality to save the accessibility tree in a structured format and provide detailed information about each node.
- The script is designed for easy modification to facilitate user experiments with different web pages.
2025-05-22 12:06:18 +02:00
Nick Sweeting
15a760ef17 backwards compatibility with old models and improved tests with icognito mode 2025-05-20 03:07:01 -07:00
Nick Sweeting
503eb97be7 fix stale tests 2025-05-20 02:33:42 -07:00
satya-nutella
ea4afadd1d Add cursor:pointer handling in buildDomTree and update test URLs 2025-05-02 12:56:04 -07:00
Nick Sweeting
78148a96f9 remove unneeded noqas 2025-05-02 15:20:00 +08:00
Christian Clauss
fb3282527d Detect blocking synchronous commands in asyncio code 2025-04-21 22:30:43 +02:00
Gregor Žunič
be0a3eb564 added *[]* for elements newly app; fixes 2025-04-08 16:39:00 +02:00
Gregor Žunič
4891513f4d added event listeners to build dom tree 2025-04-07 22:27:26 +02:00
Gregor Žunič
ee0f961429 switched to better representations 2025-04-07 21:52:13 +02:00
Gregor Žunič
624141b41b fixed text dom element processor 2025-04-07 01:28:50 +02:00
Gregor Žunič
ef55e2ea13 much better extraction test 2025-04-07 00:50:55 +02:00
Gregor Žunič
8d0db5fadb better extraction test 2025-04-06 17:17:48 +02:00
Gregor Žunič
f33beaf800 removed unnecesary code 2025-04-06 13:26:53 +02:00
Gregor Žunič
ca0c6fdd0d wip 2025-03-31 16:57:17 -07:00
Gregor Žunič
ba73c748e4 wip 2025-03-31 15:23:04 -07:00
Gregor Žunič
e9824060bd wip 2025-03-30 16:19:09 -07:00
Nick Sweeting
89d48ad50f manually fix remaining broken lines 2025-03-28 18:13:47 -07:00
Nick Sweeting
69a960fa4b refactor browser config setup process 2025-03-27 02:45:12 -07:00
Nick Sweeting
c7925c0282 fix broken BrowserConfig chrome_instance_path kwarg 2025-03-25 15:06:05 -07:00
Magnus Müller
de6618ab63 Enhance debug_page_structure with advanced element and viewport analysis 2025-02-25 07:49:38 -08:00
Magnus Müller
da4128ed3a Debug page structure 2025-02-24 15:05:22 -08:00
Magnus Müller
de4c144126 Add amazon example to test 2025-02-21 21:40:26 -08:00
Magnus Müller
65703c4afc Remove page from test 2025-02-18 11:31:40 -08:00
Magnus Müller
ecb749abb3 Remove link 2025-02-18 07:51:11 -08:00
Magnus Müller
f31d5737d1 Simplify test 2025-02-17 22:21:15 -08:00
Magnus Müller
0ccbb651f6 Extraction test script 2025-02-12 22:59:46 -08:00
magmueller
bcf0b67cf5 Add viewport_expansion to config 2025-01-20 08:59:20 -08:00
Mohit
b799b26c37 Update process_dom_test.py 2025-01-16 15:17:32 +05:30
Gregor Žunič
cf27d9e1c5 allows parralelized agents 2024-12-01 20:17:10 +01:00
Gregor Žunič
d4e9257c4c renamed service to browser 2024-12-01 14:14:48 +01:00
Gregor Žunič
0d86bbb317 wait for traffic load, better browser config 2024-11-28 22:41:01 +01:00
Gregor Žunič
34bb36d6f5 make css selectors more robust 2024-11-28 15:35:56 +01:00
Gregor Žunič
829ed138fd clicking version - still missing iframe/shadow elements penetration 2024-11-25 21:45:05 +01:00
Gregor Žunič
cb4688409e added highliting for ifreames 2024-11-25 16:35:12 +01:00
Gregor Žunič
075d03bc9b boundaries and adding attributes 2024-11-25 15:18:01 +01:00
Gregor Žunič
b48bc0f686 create relative paths from shadow elements 2024-11-25 13:15:19 +01:00
Gregor Žunič
6691cc05dc first js dom processor, to get all elements 2024-11-25 13:03:47 +01:00
Gregor Žunič
b0c390f2c0 fixed multi tab management, clicking timeouts, general bugfixes 2024-11-20 17:33:49 +01:00
Gregor Žunič
f7148e3542 untested version of playwright (kinda works) 2024-11-19 18:32:31 +01:00
Gregor Žunič
89c63fdd63 Added custom actions registry and fixed extraction layer (#20)
* Validator

* Test mind2web

* Cleaned up logger

* Pytest logger

* Cleaned up logger

* Disable flag for human input

* Multiple clicks per button

* Multiple clicks per button

* More structured system prompt

* Fields with description

* System prompt example

* One logger

* Cleaner logging

* Log step in step function

* Fix critical clicking error - wrong argument used

* Improved thought process of agent

* Improve system prompt

* Remove human input message

* Custome action registration

* Pydantic model for custom actions

* Pydantic model for custome output

* Runs through, model outputs functions, but not called yet

* Work in progress - description for custome actions

* Description works, but schema not yet

* Model can call the right action - but is not executed

* Seperate is_controller_action  and is_custom_action

* Works! Model can call custom function

* Use registry for action, but result is not feed back to model

* Include result in messages

* Works with custom function - but typing is not correct

* Renamed registry

* First test cases

* Captcha tests

* Pydantic for tests

* Improve prompts for multy step

* System prompt structure

* Handle errors like validation error

* Refactor error handling in agent

* Refactor error handling in agent

* Improved logging

* Update view

* Fix click parameter to index

* Simplify dynamic actions

* Use run instead of step

* Rename history

* Rename AgentService to Agent

* Rename ControllerService to Controller

* Pytest file

* Rename get state

* Rename BrowserService

* reversed dom extraction recursion to while

* Rename use_vision

* Rename use_vision

* reversed dom tree items and made browser less anoying

* Renaming and fixing type errors

* Renamed class names for agent

* updated requirements

* Update prompt

* Action registration works for user and controller

* Fix done call by returning ActionResult

* Fix if result is none

* Rename AgentOutput and ActionModel

* Improved prompt Passes 6/8 tests from test_agent_actions

* Calculate token cost

* Improve display

* Simplified logger

* Test function calling

* created super simple xpath extraction algo

* Tests logging

* tiny fixes to dom extraction

* Remove test

* Dont log number of clicks

* Pytest file

* merged per element js checks

* Check if driver is still open

* super fast processing

* fixed agent planning and stuff

* Fix example

* Fix example

* Improve error

* Improved error correction

* New line for step

* small type error fixes

* Test for pydantic

* Fix line

* Removed sample

* fixed readme and examples

---------

Co-authored-by: magmueller <mamagnus00@gmail.com>
2024-11-15 21:42:02 +01:00
Gregor Žunič
7729da6971 testig element highlighting 2024-11-13 13:52:28 +01:00
Gregor Žunič
7c5bc97e15 preserve element structure in outputs 2024-11-07 17:35:02 +01:00
Gregor Žunič
68201df624 src -> browser_use 2024-11-06 18:18:00 +01:00