{"record":{"id":"8b38961f53aec94f","repo":"SeleniumHQ/selenium","slug":"expected-input-and-output-file-paths-8b3896","errorCode":null,"errorMessage":"Expected input and output file paths","messagePattern":"Expected input and output file paths","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"javascript/atoms/typescript/wrap-get-attribute-as-global.js","lineNumber":27,"sourceCode":"//   http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied.  See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\n// Wraps the compiled getAttribute TypeScript output as a browser global so that\n// test HTML pages can load it directly via <script> and access it as\n// window.bot.dom.typescript.getAttribute.\n\nconst fs = require('node:fs');\n\nconst [inputPath, outputPath] = process.argv.slice(2);\n\nif (!inputPath || !outputPath) {\n  throw new Error('Expected input and output file paths');\n}\n\nconst licenseHeader = `// Licensed to the Software Freedom Conservancy (SFC) under one\n// or more contributor license agreements.  See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership.  The SFC licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License.  You may obtain a copy of the License at\n//\n//   http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied.  See the License for the\n// specific language governing permissions and limitations\n// under the License.`;","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/javascript/atoms/typescript/wrap-get-attribute-as-global.js#L9-L45","documentation":"wrap-get-attribute-as-global.js wraps the compiled getAttribute TypeScript atom as window.bot.dom.typescript.getAttribute. It requires two positional CLI args [inputPath, outputPath]; missing either throws immediately. Build-time helper invoked by Bazel; not user-facing.","triggerScenarios":"Invoking with fewer than two arguments. A Bazel rule that omits one $(location) substitution. Passing empty/undefined strings from a misconfigured macro.","commonSituations":"Editing the getAttribute atom BUILD file and dropping an argument. Manual debugging invocation. A target rename breaking location expansion.","solutions":["Invoke as: node wrap-get-attribute-as-global.js <compiled-input.js> <wrapped-output.js>.","Verify both $(location) expansions resolve to real files in the Bazel rule.","Confirm the upstream compile produced the input.","Run the Bazel target directly instead of the script."],"exampleFix":"// before\nnode javascript/atoms/typescript/wrap-get-attribute-as-global.js get-attribute.compiled.js\n\n// after\nnode javascript/atoms/typescript/wrap-get-attribute-as-global.js get-attribute.compiled.js get-attribute.global.js","handlingStrategy":"validation","validationCode":"const [inputPath, outputPath] = process.argv.slice(2)\nif (!inputPath || !outputPath) {\n  console.error('Usage: wrap-get-attribute-as-global.js <input.js> <output.js>')\n  process.exit(2)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provide both input and output paths.","Verify both Bazel $(location) substitutions.","Run the Bazel target rather than the script.","Confirm the compile step produced the input."],"tags":["build","nodejs","bazel","atoms","cli","typescript"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}