Skip to content

Commit

Permalink
[js] resolve file path (#9223)
Browse files Browse the repository at this point in the history
🐢
  • Loading branch information
harsha509 committed Mar 3, 2021
1 parent 26c65c7 commit 4464ac4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion javascript/node/selenium-webdriver/lib/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const WebSocket = require('ws')
const http = require('../http/index')
const fs = require('fs')
const { Capabilities } = require('./capabilities')
const path = require('path')

// Capability names that are defined in the W3C spec.
const W3C_CAPABILITY_NAMES = new Set([
Expand Down Expand Up @@ -1362,7 +1363,7 @@ class WebDriver {
.toString()
} catch {
mutationListener = fs
.readFileSync('./atoms/mutation-listener.js', 'utf-8')
.readFileSync(path.resolve(__dirname,'./atoms/mutation-listener.js'), 'utf-8')
.toString()
}

Expand Down

0 comments on commit 4464ac4

Please sign in to comment.