docs: consolidate analytics screenshot and improve script
- Move screenshot to standard docs/images location - Update control-ui.md to reference correct image path - Improve screenshot script with better click fallbacks - Remove duplicate screenshot from docs/gateway/images Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b493adce73
commit
2c2e94507d
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 69 KiB |
@ -50,7 +50,7 @@ The onboarding wizard generates a gateway token by default, so paste it here on
|
||||
|
||||
The Analytics tab provides visibility into your token usage and costs:
|
||||
|
||||

|
||||

|
||||
|
||||
### Plan Quota
|
||||
|
||||
|
||||
@ -67,14 +67,36 @@ async function takeScreenshot() {
|
||||
localStorage.setItem('clawdbot-control-ui-settings', JSON.stringify(settings));
|
||||
}, TOKEN);
|
||||
|
||||
// Navigate to analytics
|
||||
await page.goto(`${BASE_URL}/analytics`);
|
||||
await page.waitForTimeout(4000);
|
||||
// Reload to apply token
|
||||
await page.reload();
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
// Click refresh
|
||||
// Click on Analytics in the sidebar - use text content matching
|
||||
try {
|
||||
// Wait for sidebar to be visible
|
||||
await page.waitForSelector('nav', { timeout: 5000 });
|
||||
// Click on the Analytics link using text
|
||||
await page.click('text=Analytics', { timeout: 5000 });
|
||||
console.log('Clicked Analytics link');
|
||||
await page.waitForTimeout(4000);
|
||||
} catch (e) {
|
||||
console.log('Could not click Analytics via text:', e.message);
|
||||
// Try href-based selector
|
||||
try {
|
||||
await page.click('a[href="/analytics"]', { timeout: 3000 });
|
||||
console.log('Clicked Analytics via href');
|
||||
await page.waitForTimeout(4000);
|
||||
} catch (e2) {
|
||||
console.log('Fallback to direct navigation');
|
||||
await page.goto(`${BASE_URL}/analytics`);
|
||||
await page.waitForTimeout(4000);
|
||||
}
|
||||
}
|
||||
|
||||
// Click refresh to load data
|
||||
const refreshButton = page.locator('button', { hasText: 'Refresh' });
|
||||
try {
|
||||
await refreshButton.click();
|
||||
await refreshButton.click({ timeout: 5000 });
|
||||
console.log('Clicked refresh');
|
||||
await page.waitForTimeout(3000);
|
||||
} catch (e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user