Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
5.9 KiB
5.9 KiB
UDM Pro Add Button Identification Guide
Last Updated: 2026-01-14
Status: Ready for Manual Identification
Summary
We've built a comprehensive browser automation framework for UDM Pro static route configuration. The framework successfully:
- ✅ Authenticates and navigates to the routing page
- ✅ Maps page structure and understands UI elements
- ✅ Detects buttons using 50+ strategies
- ⚠️ Needs: Correct Add button selector identification
Current Status
What Works ✅
- Authentication: Successfully logs in with
unifi_apiaccount - Navigation: Reaches
Settings → Routing & Firewall → Static Routespage - Page Mapping: Understands page structure, buttons, tables, sections
- Button Detection: Finds all buttons on page with full context
- Menu Handling: Detects and handles dropdown menus
- Form Detection: Recognizes when route form appears
What Needs Identification ⚠️
The Add Route button selector - The script finds buttons but needs the correct one that opens the route form (not theme menu).
Tools Created
1. Main Automation Script
File: scripts/unifi/configure-static-route-playwright.js
- Comprehensive automation with 50+ detection strategies
- Handles menus, forms, errors
- Screenshot capture at each step
- Pause mode for manual intervention
2. Visual Page Analyzer
File: scripts/unifi/analyze-page-visually.js
- Opens page in visible browser
- Highlights all buttons and tables
- Interactive testing of each button
- Identifies which button opens the form
3. Strategy Tester
File: scripts/unifi/test-all-add-button-strategies.js
- Systematically tests all buttons
- Tests keyboard shortcuts
- Tests clicking in different areas
- Reports which strategy works
4. Page Mappers
map-routing-page-structure.js- Maps page sectionscomprehensive-page-mapper.js- Full page analysisfind-add-button-comprehensive.js- Button finder
How to Identify the Add Button
Method 1: Use Visual Analyzer (Recommended)
cd /home/intlc/projects/proxmox
UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
node scripts/unifi/analyze-page-visually.js
Steps:
- Script opens browser and highlights all buttons in RED
- Lists all buttons with their properties
- Enter button number to test
- Script clicks button and checks if form appears
- When form appears, script reports the selector
Method 2: Use Strategy Tester
cd /home/intlc/projects/proxmox
UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
node scripts/unifi/test-all-add-button-strategies.js
Steps:
- Script tests all buttons automatically
- Tests keyboard shortcuts
- Tests clicking in routes area
- Reports which strategy worked
Method 3: Manual Inspection
cd /home/intlc/projects/proxmox
UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
HEADLESS=false PAUSE_MODE=true \
node scripts/unifi/configure-static-route-playwright.js
Steps:
- Script pauses at Static Routes page
- Manually click the Add button
- Note the button's:
- Text content
- Class name
- ID
- Position on page
- Parent elements
Method 4: Browser DevTools
- Open browser DevTools (F12)
- Navigate to Static Routes page
- Use element inspector to find Add button
- Right-click → Inspect
- Note the selector (ID, class, or XPath)
What to Look For
Button Characteristics
The Add button likely has:
- Icon-only (no text, just an icon like + or plus)
- Near routes table or in table header
- In toolbar above routes list
- Class names containing:
add,create,new,plus,button - Aria-label containing:
add,create,new,route
Common Locations
- Table Header: Top-right of routes table
- Toolbar: Above the routes section
- Action Bar: Right side of page
- Floating Button: Bottom-right corner
- Menu: Inside a dropdown menu
What NOT to Click
- Theme buttons (open menu with "Light" option)
- Navigation buttons ("Go back to Home")
- Site switcher ("UDM Pro")
- Support buttons ("Submit Support Ticket")
Once Button is Identified
Update the Script
Add the selector to scripts/unifi/configure-static-route-playwright.js:
// Add to the addButtonSelectors array (around line 648)
const addButtonSelectors = [
// ... existing selectors ...
'YOUR_NEW_SELECTOR_HERE', // Add this
'#your-button-id', // Or ID
'button.your-class-name', // Or class
];
Test the Update
cd /home/intlc/projects/proxmox
UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
HEADLESS=true \
node scripts/unifi/configure-static-route-playwright.js
Alternative: Manual Completion Mode
If button identification is difficult, use pause mode:
cd /home/intlc/projects/proxmox
UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
HEADLESS=false PAUSE_MODE=true \
node scripts/unifi/configure-static-route-playwright.js
What happens:
- Script navigates to Static Routes page
- Pauses and waits for you to click Add button
- Detects when form appears
- Automatically fills form fields
- Clicks Save
- Verifies route was created
Screenshots for Reference
Check screenshots in scripts/unifi/screenshots/:
06-static-routes-page.png- Shows the Static Routes page07-before-add-button.png- Before searching for Add button08-after-button-click-menu.png- After clicking (if menu appears)
Next Steps
- Run Visual Analyzer to identify the button
- Update script with correct selector
- Test automation end-to-end
- Document the selector for future use
Support
If you need help:
- Check screenshots in
scripts/unifi/screenshots/ - Review logs in script output
- Use
HEADLESS=falseto see what's happening - Use
PAUSE_MODE=truefor manual intervention
Last Updated: 2026-01-14