diff --git a/examples/javascript/package-lock.json b/examples/javascript/package-lock.json index 8735a77772b1..97a5d596c8d6 100644 --- a/examples/javascript/package-lock.json +++ b/examples/javascript/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "assert": "2.1.0", - "selenium-webdriver": "4.20.0" + "selenium-webdriver": "4.21.0" }, "devDependencies": { "mocha": "10.4.0" @@ -1015,16 +1015,16 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/selenium-webdriver": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.20.0.tgz", - "integrity": "sha512-s/G44lGQ1xB3tmtX6NNPomlkpL6CxLdmAvp/AGWWwi4qv5Te1+qji7tPSyr6gyuoPpdYiof1rKnWe3luy0MrYA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.21.0.tgz", + "integrity": "sha512-WaEJHZjOWNth1QG5FEpxpREER0qptZBMonFU6GtAqdCNLJVxbtC3E7oS/I/+Q1sf1W032Wg0Ebk+m46lANOXyQ==", "dependencies": { "jszip": "^3.10.1", "tmp": "^0.2.3", "ws": ">=8.16.0" }, "engines": { - "node": ">= 14.20.0" + "node": ">= 14.21.0" } }, "node_modules/serialize-javascript": { @@ -2001,9 +2001,9 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "selenium-webdriver": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.20.0.tgz", - "integrity": "sha512-s/G44lGQ1xB3tmtX6NNPomlkpL6CxLdmAvp/AGWWwi4qv5Te1+qji7tPSyr6gyuoPpdYiof1rKnWe3luy0MrYA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.21.0.tgz", + "integrity": "sha512-WaEJHZjOWNth1QG5FEpxpREER0qptZBMonFU6GtAqdCNLJVxbtC3E7oS/I/+Q1sf1W032Wg0Ebk+m46lANOXyQ==", "requires": { "jszip": "^3.10.1", "tmp": "^0.2.3", diff --git a/examples/javascript/package.json b/examples/javascript/package.json index 41093758d9db..b31f98229aea 100644 --- a/examples/javascript/package.json +++ b/examples/javascript/package.json @@ -2,13 +2,13 @@ "name": "javascript-examples", "version": "1.0.0", "scripts": { - "test": "npx mocha test/**/*.spec.js --timeout 60000" + "test": "npx mocha test/**/keysTest.spec.js --timeout 60000" }, "author": "The Selenium project", "license": "Apache-2.0", "dependencies": { "assert": "2.1.0", - "selenium-webdriver": "4.20.0" + "selenium-webdriver": "4.21.0" }, "devDependencies": { "mocha": "10.4.0" diff --git a/examples/javascript/test/waits/waits.spec.js b/examples/javascript/test/waits/waits.spec.js index bf56a1d82957..2cb6d34a4746 100644 --- a/examples/javascript/test/waits/waits.spec.js +++ b/examples/javascript/test/waits/waits.spec.js @@ -3,7 +3,7 @@ const { By, Browser, until } = require('selenium-webdriver'); const assert = require("node:assert"); suite(function (env) { - describe('Element Interactions', function () { + describe('Waits', function () { let driver; before(async function () { @@ -47,7 +47,7 @@ suite(function (env) { await driver.get('https://www.selenium.dev/selenium/web/dynamic.html'); let revealed = await driver.findElement(By.id("revealed")); await driver.findElement(By.id("reveal")).click(); - await driver.wait(until.elementIsDisabled(revealed), 2000); + await driver.wait(until.elementIsVisible(revealed), 2000); await revealed.sendKeys("Displayed"); assert.equal(await revealed.getAttribute("value"), "Displayed") })