simoncck commited on
Commit
bfe02c5
·
verified ·
1 Parent(s): 96ca54f

Update browser_automation_ui.html

Browse files
Files changed (1) hide show
  1. browser_automation_ui.html +15 -11
browser_automation_ui.html CHANGED
@@ -140,7 +140,7 @@
140
  <div class="response-area" id="elementResp"></div>
141
  </div>
142
  </section>
143
-
144
  <!-- Inspector -->
145
  <section class="api-section">
146
  <div class="api-header"><i class="lucide lucide-layout-grid"></i><h3>Element Inspector</h3></div>
@@ -152,18 +152,18 @@
152
  </section>
153
  </div>
154
 
155
- <!-- Documentation Tab -->
156
  <div class="tab-pane" id="docTab">
157
  <h2 style="margin-bottom:12px;">API Reference</h2>
158
- <pre class="response-area" style="background:#f8fafc;color:#1e293b;border:1px solid #e2e8f0;">
159
- POST /api/browser/launch → { sessionId }
160
- POST /api/browser/navigate {"url": "https://..."}
161
- POST /api/browser/screenshot → { b64 }
162
- POST /api/browser/eval {"selector":"...","action":"click|type|textContent","text":"..."}
163
- POST /api/browser/inspect → { selectors:["#id",".class",...] }
164
-
165
- All endpoints return { ok: true/false, data, error }
166
- </pre>
167
  </div>
168
  </div>
169
  </div>
@@ -292,6 +292,10 @@ All endpoints return { ok: true/false, data, error }
292
  });
293
  }
294
 
 
 
 
 
295
  // Init icons & status
296
  window.addEventListener('DOMContentLoaded',()=>{ lucide.createIcons(); checkStatus(); });
297
  </script>
 
140
  <div class="response-area" id="elementResp"></div>
141
  </div>
142
  </section>
143
+
144
  <!-- Inspector -->
145
  <section class="api-section">
146
  <div class="api-header"><i class="lucide lucide-layout-grid"></i><h3>Element Inspector</h3></div>
 
152
  </section>
153
  </div>
154
 
155
+ <!-- -------------------- Documentation Tab -------------------- -->
156
  <div class="tab-pane" id="docTab">
157
  <h2 style="margin-bottom:12px;">API Reference</h2>
158
+ <pre class="response-area" style="background:#f8fafc;color:#1e293b;border:1px solid #e2e8f0;">
159
+ POST /api/browser/launch → { session_id }
160
+ POST /api/browser/navigate {"url":"https://..."}
161
+ POST /api/browser/screenshot → { screenshot }
162
+ POST /api/elements/action {"selector":"...","action":"click|type|textContent","value":"..."}
163
+ GET /api/elements/inspect/{session_id} → { elements:[...] }
164
+
165
+ All endpoints return { status / error / data }
166
+ </pre>
167
  </div>
168
  </div>
169
  </div>
 
292
  });
293
  }
294
 
295
+ document.getElementById('action').addEventListener('change', e => {
296
+ document.getElementById('typeTextGroup').style.display = e.target.value === 'type' ? 'block' : 'none';
297
+ });
298
+
299
  // Init icons & status
300
  window.addEventListener('DOMContentLoaded',()=>{ lucide.createIcons(); checkStatus(); });
301
  </script>