@minded-ai/mindedjs 1.0.0-ec2-beta-3 → 1.0.0-ec2-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,8 +89,14 @@ class ScreenshotCapture:
|
|
|
89
89
|
# Get current page
|
|
90
90
|
page = await agent.browser_session.get_current_page()
|
|
91
91
|
|
|
92
|
-
# Get current URL for context
|
|
93
|
-
|
|
92
|
+
# Get current URL for context - use page.url() method or fallback
|
|
93
|
+
try:
|
|
94
|
+
# Try as property first
|
|
95
|
+
current_url = page.url if hasattr(page, 'url') else page.url()
|
|
96
|
+
except:
|
|
97
|
+
# Fallback if URL is not accessible
|
|
98
|
+
current_url = "unknown"
|
|
99
|
+
|
|
94
100
|
logger.info(f"📸 Taking step_end screenshot at: {current_url}")
|
|
95
101
|
|
|
96
102
|
# Update step counter
|
package/package.json
CHANGED
|
@@ -89,8 +89,14 @@ class ScreenshotCapture:
|
|
|
89
89
|
# Get current page
|
|
90
90
|
page = await agent.browser_session.get_current_page()
|
|
91
91
|
|
|
92
|
-
# Get current URL for context
|
|
93
|
-
|
|
92
|
+
# Get current URL for context - use page.url() method or fallback
|
|
93
|
+
try:
|
|
94
|
+
# Try as property first
|
|
95
|
+
current_url = page.url if hasattr(page, 'url') else page.url()
|
|
96
|
+
except:
|
|
97
|
+
# Fallback if URL is not accessible
|
|
98
|
+
current_url = "unknown"
|
|
99
|
+
|
|
94
100
|
logger.info(f"📸 Taking step_end screenshot at: {current_url}")
|
|
95
101
|
|
|
96
102
|
# Update step counter
|