Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class BrowsingContextInspector {
this.ws.on('message', (event) => {
const { params } = JSON.parse(Buffer.from(event.toString()))
if (params) {
let response = null
let response
if ('navigation' in params) {
response = new NavigationInfo(params.context, params.navigation, params.timestamp, params.url)
} else if ('accepted' in params) {
Expand Down
3 changes: 2 additions & 1 deletion javascript/selenium-webdriver/common/driverFinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ function getBinaryPaths(capabilities) {
const args = getArgs(capabilities)
return binaryPaths(args)
} catch (e) {
throw Error(
throw new Error(
`Unable to obtain browser driver.
For more information on how to install drivers see
https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. ${e}`,
{ cause: e },
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion javascript/selenium-webdriver/common/seleniumManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function binaryPaths(args) {
try {
output = JSON.parse(spawnResult.stdout.toString())
} catch (e) {
throw new Error(`Error executing command for ${smBinary} with ${args}: ${e.toString()}`)
throw new Error(`Error executing command for ${smBinary} with ${args}: ${e.toString()}`, { cause: e })
}

logOutput(output)
Expand Down
3 changes: 2 additions & 1 deletion javascript/selenium-webdriver/lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ function requireAtom(module, bazelTarget) {
return require(path.resolve(`../../../bazel-bin/${file}`))
} catch (ex2) {
log_.severe(ex2)
throw Error(
throw new Error(
`Failed to import atoms module ${module}. If running in dev mode, you` +
` need to run \`bazel build ${bazelTarget}\` from the project` +
`root: ${ex}`,
{ cause: ex2 },
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions javascript/selenium-webdriver/lib/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ class WebDriver {
* @return {!Promise<resolved>} A new CDP instance.
*/
async createCDPConnection(target) {
let debuggerUrl = null
let debuggerUrl

const caps = await this.getCapabilities()

Expand Down Expand Up @@ -1502,7 +1502,7 @@ class WebDriver {
null,
)

let mutationListener = ''
let mutationListener
try {
// Depending on what is running the code it could appear in 2 different places which is why we try
// here and then the other location
Expand Down
4 changes: 2 additions & 2 deletions javascript/selenium-webdriver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"ws": "^8.20.1"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@eslint/js": "^10.0.1",
"clean-jsdoc-theme": "^4.3.2",
"eslint": "^9.39.4",
"eslint": "^10.4.0",
"eslint-config-prettier": "^10.1.8",
Comment thread
harsha509 marked this conversation as resolved.
"eslint-plugin-mocha": "^11.2.0",
"eslint-plugin-n": "^18.0.1",
Expand Down
Loading
Loading