File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def __init__(self, stagehand_instance):
4545
4646 async def _ensure_page_stability (self ):
4747 """Wait for any pending page switches to complete"""
48- if hasattr (self ._stagehand , ' _page_switch_lock' ):
48+ if hasattr (self ._stagehand , " _page_switch_lock" ):
4949 async with self ._stagehand ._page_switch_lock :
5050 pass # Just wait for any ongoing switches
5151
@@ -64,9 +64,11 @@ def __getattr__(self, name):
6464 # For async operations, make them wait for stability
6565 attr = getattr (active_page , name )
6666 if callable (attr ) and asyncio .iscoroutinefunction (attr ):
67+
6768 async def wrapped (* args , ** kwargs ):
6869 await self ._ensure_page_stability ()
6970 return await attr (* args , ** kwargs )
71+
7072 return wrapped
7173 return attr
7274
You can’t perform that action at this time.
0 commit comments