{"record":{"id":"71cd20390d2b46f4","repo":"garrytan/gstack","slug":"usage-browse-css-selector-property","errorCode":null,"errorMessage":"Usage: browse css <selector> <property>","messagePattern":"Usage: browse css <selector> <property>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"browse/src/read-commands.ts","lineNumber":327,"sourceCode":"      const filePath = rest[0];\n      if (!filePath) throw new Error('Usage: browse eval <js-file> [--out <file>] [--raw]');\n      if (bm) assertJsOriginAllowed(bm, page.url());\n      validateReadPath(filePath);\n      if (!fs.existsSync(filePath)) throw new Error(`File not found: ${filePath}`);\n      const code = fs.readFileSync(filePath, 'utf-8');\n      const wrapped = wrapForEvaluate(code);\n      const result = await target.evaluate(wrapped);\n      const str = resultToString(result);\n      if (outPath) {\n        const n = writeEvalResult(outPath, str, { raw });\n        return `Eval result written: ${outPath} (${n} bytes)`;\n      }\n      return str;\n    }\n\n    case 'css': {\n      const [selector, property] = args;\n      if (!selector || !property) throw new Error('Usage: browse css <selector> <property>');\n      const resolved = await session.resolveRef(selector);\n      if ('locator' in resolved) {\n        const value = await resolved.locator.evaluate(\n          (el, prop) => getComputedStyle(el).getPropertyValue(prop),\n          property\n        );\n        return value;\n      }\n      const value = await target.evaluate(\n        ([sel, prop]) => {\n          const el = document.querySelector(sel);\n          if (!el) return `Element not found: ${sel}`;\n          return getComputedStyle(el).getPropertyValue(prop);\n        },\n        [resolved.selector, property]\n      );\n      return value;\n    }","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/read-commands.ts#L309-L345","documentation":"Error \"Usage: browse css <selector> <property>\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at browse/src/read-commands.ts:327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}