Commit Graph

664 Commits

Author SHA1 Message Date
Nick Sweeting 8daaaf665c auto-refresh state when desired element idx is not found 2025-06-10 06:17:52 -07:00
Nick Sweeting 79ca05f534 fix unawaited grant_permissions 2025-06-10 05:54:31 -07:00
Nick Sweeting 758e21880a fix awaiting sync methods in viewport setup 2025-06-10 05:49:44 -07:00
Nick Sweeting 6f23c06589 show explicit error when add_init_script failes due to bad browser handle 2025-06-10 05:37:29 -07:00
Nick Sweeting 01ca602b4c retry playwright connection when new_tab fails 2025-06-10 04:45:00 -07:00
Nick Sweeting 29a715bc82 hide unneeded log lines 2025-06-10 04:42:37 -07:00
Nick Sweeting e143d079af stop playwright node subprocess when session.kill is called 2025-06-10 03:32:52 -07:00
Nick Sweeting 5d7df84d29 recreate playwright instance if detected from another asyncio loop 2025-06-10 03:02:58 -07:00
Nick Sweeting 058c262902 add warning about being in a different eventloop than playwright handle 2025-06-10 02:45:20 -07:00
Nick Sweeting 9a08e3b031 add better logging with reference ids for each object 2025-06-10 02:10:57 -07:00
Nick Sweeting 1d3f7e5f4d catch needless wait_for_load_state timeouterrors 2025-06-10 02:06:38 -07:00
Nick Sweeting 42f4112fba fix tab not found in list error when human closes active agent ta 2025-06-10 02:05:42 -07:00
Nick Sweeting 0fea9f4633 dont dump storage_state if not needed, it makes the browser look glitchy 2025-06-10 02:05:04 -07:00
Nick Sweeting 023c702f4d pass logger object down the chain to sub-objects for re-use 2025-06-10 00:38:38 -07:00
Nick Sweeting 930a7aa4de use self.logger for timing log lines 2025-06-10 00:24:50 -07:00
Nick Sweeting 279bab4e86 fix InstanceOf pydantic validation 2025-06-09 22:34:35 -07:00
Nick Sweeting 1c7eb2b849 add some newlines in logging output to visually separate steps 2025-06-09 22:05:37 -07:00
Nick Sweeting 2ebb9db6f1 tweak logging and emoji 2025-06-09 21:18:04 -07:00
Nick Sweeting 96de7c1b5f fix error with cookies_file variable scope 2025-06-09 21:05:42 -07:00
Nick Sweeting 6c9e5d4f94 kill browser process more cleanly 2025-06-09 21:01:46 -07:00
Nick Sweeting fa974d6e2f fix early Path.resolve call and other cubic comments 2025-06-09 20:25:39 -07:00
Nick Sweeting b5ab4c6492 fix BrowserSession reuse in tests 2025-06-09 20:14:26 -07:00
Nick Sweeting edeab395ed make sure cookies_path is always resolved 2025-06-09 18:52:01 -07:00
Nick Sweeting 4428a075de place granular 15sec timeout on browser setup sub-steps 2025-06-09 18:51:51 -07:00
Nick Sweeting e9b359d920 dont use github for logo to avoid ratelimits 2025-06-09 18:37:57 -07:00
Nick Sweeting 4b7cbf23fa only steal human tab focus when absolutely necessary 2025-06-09 18:37:35 -07:00
Nick Sweeting 5a72b7b9f2 fix but with storage_state raising an exception on every save 2025-06-09 18:37:19 -07:00
Nick Sweeting 8b4f166398 allow checking BrowserSession.__eq__ to determine underlying browser identity 2025-06-09 18:37:00 -07:00
Nick Sweeting 90d5bc19fe always copy browser_profile to new obj to avoid different equality or identity checking behavior depending on overrides presence 2025-06-09 18:36:37 -07:00
Nick Sweeting 8b194293b7 never start multiple playwright connections per process 2025-06-09 15:01:19 -07:00
Nick Sweeting f94d56910f consistent test fixture scope, fix race condition on shutdown, improve logging 2025-06-06 19:21:51 -07:00
Magnus Müller f485f617e8 Refactor file input search logic in BrowserSession: Simplified the method for finding file inputs by enhancing the traversal strategy, improving clarity in the docstring, and removing unnecessary helper functions. 2025-06-06 23:40:29 +02:00
Magnus Müller 40fa99d39e Refine file upload element search in BrowserSession: Introduced max_descendant_depth parameter to find_file_upload_element_by_index, enhancing the search for file inputs in sibling descendants. 2025-06-06 23:19:45 +02:00
Magnus Müller 99f35eb52f Enhance file upload element search in BrowserSession: Added max_height parameter to find_file_upload_element_by_index for improved ancestor and sibling checks, ensuring robust identification of file inputs. 2025-06-06 23:15:14 +02:00
Nick Sweeting 502d8d1579 cancel all playwright async tasks on exit 2025-06-06 02:03:39 -07:00
Nick Sweeting ac403b79fe kill chrome child processes during __del__ 2025-06-06 01:49:11 -07:00
Nick Sweeting 6e47704ab6 more careful playwright connection cleanup on __del__ 2025-06-06 01:31:55 -07:00
Nick Sweeting 9b3dd67dad stop playwright during browser teardown 2025-06-06 01:23:47 -07:00
Nick Sweeting 815fbace3d place timeout limits on browser.close calls, and prevent deadlock infinite loop on connection check 2025-06-06 00:52:56 -07:00
Nick Sweeting 1b588328a3 log line before browser is killed instead of after 2025-06-05 23:59:56 -07:00
Nick Sweeting 819859c006 add BrowserSession.kill method 2025-06-05 23:44:23 -07:00
Nick Sweeting e1aa19bf5b fix test deadlocks by setting max 30sec timeout on launch and close 2025-06-05 23:35:25 -07:00
Nick Sweeting 6d2826b37a show 4 chars of id instead of 3 2025-06-05 23:28:53 -07:00
Nick Sweeting 67b9a267db force-start browser is is_connected is false when create_new_tab 2025-06-05 22:58:33 -07:00
Nick Sweeting 8f057d9a12 use dedicated per-object logger for Agent and BrowserSession 2025-06-05 22:56:43 -07:00
Nick Sweeting 831feaa107 bump version number 2025-06-05 22:28:49 -07:00
Nick Sweeting 8306a01a02 cleaner agent and browser session logging on connect and disconnect 2025-06-05 22:21:42 -07:00
Nick Sweeting 2a39dfa1c5 use self.logger to shorten log lines 2025-06-05 21:21:10 -07:00
Nick Sweeting 23d3bf4205 rename .emit to .dispatch and prefix event params to prevent clashes 2025-06-05 21:04:26 -07:00
Nick Sweeting cf6a0d9fbf improve chrome launch error handling when user_data_dir is bad 2025-06-05 18:22:02 -07:00