Files
proxmox/docs/04-configuration/UDM_PRO_BROWSER_AUTOMATION_STATUS.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- 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>
2026-02-12 15:46:57 -08:00

5.4 KiB

UDM Pro Browser Automation Status

Last Updated: 2026-01-14
Status: Partially Automated - Login and Navigation Working


Completed Features

1. Authentication

  • Login Working: Successfully authenticates with unifi_api account
  • Password: L@kers2010$$ (verified working)
  • Error Handling: Comprehensive error detection and logging

2. Navigation

  • Login Page: Successfully navigates and fills credentials
  • Routing Page: Successfully navigates to Settings → Routing & Firewall → Static Routes
  • Screenshot Capture: Automatic screenshots at each step for debugging

3. Script Features

  • Pause Mode: Can pause at key points for manual intervention (PAUSE_MODE=true)
  • Dry Run Mode: Test mode that doesn't make changes (DRY_RUN=true)
  • Comprehensive Logging: Detailed logs at each step
  • Error Recovery: Attempts multiple strategies for each action
  • Improved Detections: Enhanced selectors for buttons and form fields

⚠️ Current Issue

Add Button Detection

The script successfully reaches the Static Routes page but cannot automatically find the "Add" button to create a new route.

Possible Reasons:

  1. The Add button may be in a different location (toolbar, table header, etc.)
  2. The button may be dynamically loaded after page render
  3. The button may have different selectors than expected
  4. The UI structure may differ from expected patterns

Buttons Found on Page:

  • Button 0: "UDM Pro" (Site Switcher)
  • Button 1: Empty text, icon-only
  • Button 2: Empty text, icon-only (most likely candidate)
  • Button 4-5: "Submit Support Ticket"
  • Button 6: "Go back to Home"
  • Button 7-8: Empty text, icon-only (disabled)

🔧 Usage

Basic Usage

cd /home/intlc/projects/proxmox
UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
  HEADLESS=true node scripts/unifi/configure-static-route-playwright.js

With Visible Browser (for debugging)

UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
  HEADLESS=false node scripts/unifi/configure-static-route-playwright.js

With Pause Mode (manual intervention)

UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
  PAUSE_MODE=true HEADLESS=false node scripts/unifi/configure-static-route-playwright.js

Dry Run (testing)

UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
  DRY_RUN=true HEADLESS=true node scripts/unifi/configure-static-route-playwright.js

📸 Screenshots

Screenshots are automatically saved to scripts/unifi/screenshots/:

  • 01-login-page.png - Initial login page
  • 02-credentials-filled.png - After filling credentials
  • 03-after-login.png - After successful login
  • 05-routing-page.png - Routing settings page
  • 06-static-routes-page.png - Static routes section
  • 07-before-add-button.png - Before searching for Add button
  • error-state.png - If an error occurs

🎯 Next Steps

  1. Run script with visible browser:
    UNIFI_USERNAME=unifi_api UNIFI_PASSWORD='L@kers2010$$' \
      HEADLESS=false node scripts/unifi/configure-static-route-playwright.js
    
  2. When script reaches Static Routes page, manually click the "Add" button
  3. Fill in the form:
    • Name: Route to VLAN 11
    • Destination: 192.168.11.0/24
    • Gateway: 192.168.11.1
  4. Click Save
  5. Script will verify the route was created

Option 2: Improve Button Detection

  1. Review screenshots in scripts/unifi/screenshots/06-static-routes-page.png
  2. Identify the exact selector for the Add button
  3. Update the script with the correct selector
  4. Re-run the script

Option 3: Use API Alternative

Since the API doesn't support static routes, consider:

  • Using the script to navigate to the page
  • Manually completing the form
  • Or using the script as a helper tool

📋 Configuration

The script is configured to create:

  • Name: Route to VLAN 11
  • Destination Network: 192.168.11.0/24
  • Gateway: 192.168.11.1

To modify, edit the ROUTE_CONFIG object in the script.


🔍 Troubleshooting

Login Fails

  • Verify credentials: unifi_api / L@kers2010$$
  • Check account is local (not SSO)
  • Ensure 2FA is disabled

Cannot Find Add Button

  • Review screenshots to see actual UI
  • Run with HEADLESS=false to see what's happening
  • Check if button is in a different location (toolbar, table header, etc.)

Form Not Filling

  • Check screenshots to see form structure
  • Verify form field selectors match actual UI
  • Run with PAUSE_MODE=true to manually verify

📝 Script Improvements Made

  1. Added pause functionality for manual intervention
  2. Improved button detection with 30+ selectors
  3. Enhanced form field detection
  4. Better error handling and recovery
  5. Comprehensive logging at each step
  6. Screenshot capture for debugging
  7. Support for disabled buttons
  8. Form detection after button click
  9. Navigation recovery if wrong button clicked

🎉 Success Criteria

The script will be fully automated when it can:

  • Log in (DONE)
  • Navigate to Static Routes page (DONE)
  • ⚠️ Find and click Add button (IN PROGRESS)
  • ⚠️ Fill form fields (READY - waiting for form)
  • ⚠️ Click Save button (READY - waiting for form)
  • ⚠️ Verify route was created (READY)

Last Updated: 2026-01-14