{"record":{"id":"62bcee9569e8a782","repo":"garrytan/gstack","slug":"usage-browse-attrs-selector","errorCode":null,"errorMessage":"Usage: browse attrs <selector>","messagePattern":"Usage: browse attrs <selector>","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"browse/src/read-commands.ts","lineNumber":349,"sourceCode":"          (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    }\n\n    case 'attrs': {\n      const selector = args[0];\n      if (!selector) throw new Error('Usage: browse attrs <selector>');\n      const resolved = await session.resolveRef(selector);\n      if ('locator' in resolved) {\n        const attrs = await resolved.locator.evaluate((el) => {\n          const result: Record<string, string> = {};\n          for (const attr of el.attributes) {\n            result[attr.name] = attr.value;\n          }\n          return result;\n        });\n        return JSON.stringify(attrs, null, 2);\n      }\n      const attrs = await target.evaluate((sel: string) => {\n        const el = document.querySelector(sel);\n        if (!el) return `Element not found: ${sel}`;\n        const result: Record<string, string> = {};\n        for (const attr of el.attributes) {\n          result[attr.name] = attr.value;\n        }","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/read-commands.ts#L331-L367","documentation":"Error \"Usage: browse attrs <selector>\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at browse/src/read-commands.ts:349 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"}