diff --git a/package.json b/package.json index a3703ca1d..3c1c7cb44 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@cucumber/cucumber-expressions": "^16", "@cucumber/gherkin": "^26", "@cucumber/messages": "^21.0.1", + "@xmldom/xmldom": "^0.7.9", "acorn": "^7.4.1", "arrify": "^2.0.1", "axios": "^1.3.3", @@ -138,7 +139,6 @@ "wdio-docker-service": "^1.5.0", "webdriverio": "^8.3.8", "xml2js": "^0.4.23", - "xmldom": "^0.1.31", "xpath": "0.0.27" }, "engines": { diff --git a/test/unit/locator_test.js b/test/unit/locator_test.js index 80a7d45af..a6ceaa11d 100644 --- a/test/unit/locator_test.js +++ b/test/unit/locator_test.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const Dom = require('xmldom').DOMParser; +const { DOMParser } = require('@xmldom/xmldom'); const xpath = require('xpath'); const Locator = require('../../lib/locator'); @@ -56,7 +56,7 @@ const xml = ` describe('Locator', () => { beforeEach(() => { - doc = new Dom().parseFromString(xml); + doc = new DOMParser().parseFromString(xml, 'application/xhtml+xml'); }); describe('constructor', () => {