|
16 | 16 | "state": "networkidle" |
17 | 17 | }, |
18 | 18 | { |
19 | | - "type": "screenshot", |
| 19 | + "action": "screenshot", |
20 | 20 | "description": "Screenshot of initial page", |
21 | 21 | "save_to": "01_initial_page.png" |
22 | 22 | }, |
23 | 23 | { |
24 | | - "type": "execute_js", |
| 24 | + "action": "execute_js", |
25 | 25 | "description": "Check page state - DOM method (fastest)", |
26 | 26 | "script": "(function() { var title = document.title.toLowerCase(); return { title: document.title, url: window.location.href, isLoginPage: title.includes('secure authentication') || title.includes('login') || title.includes('sign in'), hasLoginForm: !!document.querySelector('input[type=\"password\"]'), hasSearchForm: !!document.querySelector('input[name=\"postcode\"], input[id*=\"postcode\"], input[placeholder*=\"postcode\"]') }; })()" |
27 | 27 | }, |
28 | 28 | { |
29 | | - "type": "extract", |
| 29 | + "action": "extract", |
30 | 30 | "description": "Identify page type using vision (if DOM unclear)", |
31 | 31 | "method": "vision", |
32 | 32 | "prompt": "Analyze this BT Wholesale webpage and determine: 1) Is this a login/authentication page (might show 'Secure Authentication'), a search/checker page, or results page? 2) What is the main call-to-action? 3) Are there any error messages or notices visible?", |
|
59 | 59 | } |
60 | 60 | }, |
61 | 61 | { |
62 | | - "type": "fill", |
| 62 | + "action": "fill", |
63 | 63 | "description": "Enter username (if on login page)", |
64 | 64 | "escalation_chain": [ |
65 | 65 | { |
|
89 | 89 | "value": "nterizakis" |
90 | 90 | }, |
91 | 91 | { |
92 | | - "type": "click", |
| 92 | + "action": "click", |
93 | 93 | "description": "Click Next/Continue button after username", |
94 | 94 | "escalation_chain": [ |
95 | 95 | { |
|
126 | 126 | ] |
127 | 127 | }, |
128 | 128 | { |
129 | | - "type": "wait", |
| 129 | + "action": "wait", |
130 | 130 | "description": "Wait for password field to appear", |
131 | 131 | "locator": { |
132 | 132 | "strategy": "selector", |
|
140 | 140 | "state": "networkidle" |
141 | 141 | }, |
142 | 142 | { |
143 | | - "type": "screenshot", |
| 143 | + "action": "screenshot", |
144 | 144 | "description": "Screenshot of password page", |
145 | 145 | "save_to": "01b_after_username.png" |
146 | 146 | }, |
147 | 147 | { |
148 | | - "type": "wait", |
| 148 | + "action": "wait", |
149 | 149 | "description": "Wait for browser autofill to complete", |
150 | 150 | "duration": 2000 |
151 | 151 | }, |
152 | 152 | { |
153 | | - "type": "click", |
| 153 | + "action": "click", |
154 | 154 | "description": "Click password field to activate password manager", |
155 | 155 | "escalation_chain": [ |
156 | 156 | { |
|
164 | 164 | ] |
165 | 165 | }, |
166 | 166 | { |
167 | | - "type": "wait", |
| 167 | + "action": "wait", |
168 | 168 | "description": "Wait for password manager dropdown to appear", |
169 | 169 | "duration": 1000 |
170 | 170 | }, |
171 | 171 | { |
172 | | - "type": "press", |
| 172 | + "action": "press", |
173 | 173 | "description": "Select password from manager (Arrow Down + Enter)", |
174 | 174 | "keys": ["ArrowDown", "Enter"], |
175 | 175 | "delay": 500 |
176 | 176 | }, |
177 | 177 | { |
178 | | - "type": "wait", |
| 178 | + "action": "wait", |
179 | 179 | "description": "Wait for password to fill from manager", |
180 | 180 | "duration": 1500 |
181 | 181 | }, |
182 | 182 | { |
183 | | - "type": "execute_js", |
| 183 | + "action": "execute_js", |
184 | 184 | "description": "Verify password was filled by password manager", |
185 | 185 | "script": "(function() { var pwdField = document.querySelector('input[type=\"password\"]'); return { passwordFilled: pwdField ? pwdField.value.length > 0 : false, passwordLength: pwdField ? pwdField.value.length : 0, hasPasswordField: !!pwdField }; })()" |
186 | 186 | }, |
187 | 187 | { |
188 | | - "type": "click", |
| 188 | + "action": "click", |
189 | 189 | "description": "Click Next button on password page", |
190 | 190 | "escalation_chain": [ |
191 | 191 | { |
|
220 | 220 | "state": "networkidle" |
221 | 221 | }, |
222 | 222 | { |
223 | | - "type": "wait", |
| 223 | + "action": "wait", |
224 | 224 | "description": "Wait for SSO redirect to complete (BT portal)", |
225 | 225 | "duration": 3000 |
226 | 226 | }, |
|
230 | 230 | "state": "networkidle" |
231 | 231 | }, |
232 | 232 | { |
233 | | - "type": "screenshot", |
| 233 | + "action": "screenshot", |
234 | 234 | "description": "Screenshot after login and SSO redirect", |
235 | 235 | "save_to": "02_after_login.png" |
236 | 236 | }, |
237 | 237 | { |
238 | | - "type": "execute_js", |
| 238 | + "action": "execute_js", |
239 | 239 | "description": "Verify we're on BT wholesale portal", |
240 | 240 | "script": "(function() { var url = window.location.href; var hash = window.location.hash; return { url: url, hash: hash, onBTWholesale: url.includes('bbactotl.btwholesale.com') || url.includes('btwholesale'), currentPage: hash }; })()" |
241 | 241 | }, |
242 | 242 | { |
243 | | - "type": "navigate", |
| 243 | + "action": "navigate", |
244 | 244 | "description": "Navigate to Address Checker page", |
245 | 245 | "url": "https://bbactotl.btwholesale.com/bbac-ui/totl/totlSearch/#/ADSL/AddressHome" |
246 | 246 | }, |
|
250 | 250 | "state": "networkidle" |
251 | 251 | }, |
252 | 252 | { |
253 | | - "type": "screenshot", |
| 253 | + "action": "screenshot", |
254 | 254 | "description": "Screenshot of Address Checker page", |
255 | 255 | "save_to": "02b_address_checker.png" |
256 | 256 | }, |
257 | 257 | { |
258 | | - "type": "execute_js", |
| 258 | + "action": "execute_js", |
259 | 259 | "description": "Verify Address Checker page loaded", |
260 | 260 | "script": "(function() { var url = window.location.href; var hash = window.location.hash; var postcodeInput = document.querySelector('input[name*=\"postcode\"], input[id*=\"postcode\"], input[placeholder*=\"postcode\" i]'); return { url: url, hash: hash, hasPostcodeField: !!postcodeInput, postcodeFieldVisible: postcodeInput ? window.getComputedStyle(postcodeInput).display !== 'none' : false, pageTitle: document.title }; })()" |
261 | 261 | }, |
262 | 262 | { |
263 | | - "type": "wait", |
| 263 | + "action": "wait", |
264 | 264 | "description": "Wait for Address Checker form to be ready", |
265 | 265 | "duration": 2000 |
266 | 266 | }, |
267 | 267 | { |
268 | | - "type": "fill", |
| 268 | + "action": "fill", |
269 | 269 | "description": "Enter postcode in search field", |
270 | 270 | "escalation_chain": [ |
271 | 271 | { |
|
304 | 304 | "value": "{{postcode}}" |
305 | 305 | }, |
306 | 306 | { |
307 | | - "type": "click", |
| 307 | + "action": "click", |
308 | 308 | "description": "Click search/check availability button", |
309 | 309 | "escalation_chain": [ |
310 | 310 | { |
|
346 | 346 | "state": "networkidle" |
347 | 347 | }, |
348 | 348 | { |
349 | | - "type": "screenshot", |
| 349 | + "action": "screenshot", |
350 | 350 | "description": "Screenshot after search", |
351 | 351 | "save_to": "02_after_search.png" |
352 | 352 | }, |
353 | 353 | { |
354 | | - "type": "extract", |
| 354 | + "action": "extract", |
355 | 355 | "description": "Check if address selection is needed", |
356 | 356 | "method": "vision", |
357 | 357 | "prompt": "Look at this page after postcode search. Answer: 1) Does it show a list of addresses to select from? 2) Does it show broadband packages directly? 3) Is there an error or 'no results' message?", |
|
383 | 383 | } |
384 | 384 | }, |
385 | 385 | { |
386 | | - "type": "click", |
| 386 | + "action": "click", |
387 | 387 | "description": "Select matching address from list", |
388 | 388 | "escalation_chain": [ |
389 | 389 | { |
|
420 | 420 | ] |
421 | 421 | }, |
422 | 422 | { |
423 | | - "type": "click", |
| 423 | + "action": "click", |
424 | 424 | "description": "Click the submit/continue button after selecting the address", |
425 | 425 | "escalation_chain": [ |
426 | 426 | { |
|
470 | 470 | "state": "networkidle" |
471 | 471 | }, |
472 | 472 | { |
473 | | - "type": "wait", |
| 473 | + "action": "wait", |
474 | 474 | "description": "Wait for JavaScript redirect to complete (address details page)", |
475 | 475 | "duration": 3000 |
476 | 476 | }, |
|
480 | 480 | "state": "networkidle" |
481 | 481 | }, |
482 | 482 | { |
483 | | - "type": "screenshot", |
| 483 | + "action": "screenshot", |
484 | 484 | "description": "Screenshot of packages page", |
485 | 485 | "save_to": "03_packages.png" |
486 | 486 | }, |
487 | 487 | { |
488 | | - "type": "extract", |
| 488 | + "action": "extract", |
489 | 489 | "description": "Extract all broadband packages with conditional logic", |
490 | 490 | "method": "vision", |
491 | 491 | "prompt": "Extract broadband availability information from the results page following these steps: 1. ALWAYS CAPTURE (if visible): - ALK (Access Line Key) - usually displayed near top - Exchange Code - BT exchange identifier 2. CHECK FEATURED PRODUCTS SECTION: Look for a section called 'Featured Products'. Search for a row/line containing 'WBC FTTP'. 3. IF 'WBC FTTP' IS FOUND: - Set fttp_avail = true - From the WBC FTTP row, capture 'Downstream Line Rate' (this is the SOADSL DSL speed in Mbps). Then navigate to OTHER SECTIONS: a) OTHER OFFERINGS section: - Check if ANY row has 'Service Availability' field = 'Enabled' - If found, set sogea_avail = true, otherwise false. b) ONT DETAILS section: - Find the LAST row in this section - Capture: 'Reference' field (this is ont_reference) - Capture: 'ONT Serial Number' field (this is ont_serial_no) - Capture: 'Port Service ID' field (this is port_service_id) c) PREMISE ENVIRONMENT section: - Capture: 'Recommended Minimum SVR NLP' field (this is install_type) - Valid values are typically 'Standard' or 'Premium'. 4. IF 'WBC FTTP' IS NOT FOUND: - Set fttp_avail = false - Leave all FTTP-related fields blank (install_type, sogea_avail, soadsl_dsl_speed, ont_reference, ont_serial_no, port_service_id). IMPORTANT: fttp_avail is REQUIRED and must always be set to true or false based on whether WBC FTTP is present in Featured Products.", |
|
534 | 534 | } |
535 | 535 | }, |
536 | 536 | { |
537 | | - "type": "screenshot", |
| 537 | + "action": "screenshot", |
538 | 538 | "description": "Final screenshot for verification", |
539 | 539 | "save_to": "04_final.png" |
540 | 540 | } |
|
0 commit comments