Skip to content

Commit 4464ac4

Browse files
authored
[js] resolve file path (#9223)
🐢
1 parent 26c65c7 commit 4464ac4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

javascript/node/selenium-webdriver/lib/webdriver.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const WebSocket = require('ws')
3535
const http = require('../http/index')
3636
const fs = require('fs')
3737
const { Capabilities } = require('./capabilities')
38+
const path = require('path')
3839

3940
// Capability names that are defined in the W3C spec.
4041
const W3C_CAPABILITY_NAMES = new Set([
@@ -1362,7 +1363,7 @@ class WebDriver {
13621363
.toString()
13631364
} catch {
13641365
mutationListener = fs
1365-
.readFileSync('./atoms/mutation-listener.js', 'utf-8')
1366+
.readFileSync(path.resolve(__dirname,'./atoms/mutation-listener.js'), 'utf-8')
13661367
.toString()
13671368
}
13681369

0 commit comments

Comments
 (0)