Skip to content

Commit d508354

Browse files
committed
Debugging tests
1 parent 483b8e1 commit d508354

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/javascript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "javascript-examples",
33
"version": "1.0.0",
44
"scripts": {
5-
"test": "npx mocha test/**/*.spec.js --timeout 90000"
5+
"test": "npx mocha test/actionsApi/mouse/moveByOffset.spec.js --timeout 90000"
66
},
77
"author": "The Selenium project",
88
"license": "Apache-2.0",

examples/javascript/test/actionsApi/mouse/moveByOffset.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {By, Origin, Builder} = require('selenium-webdriver');
1+
const {By, Origin, Builder, until } = require('selenium-webdriver');
22
const assert = require('assert');
33

44
describe('Mouse move by offset', function () {
@@ -16,7 +16,7 @@ describe('Mouse move by offset', function () {
1616
const actions = driver.actions({async: true});
1717
await actions.move({x: 8, y: 0, origin: mouseTracker}).perform();
1818

19-
await driver.sleep(500);
19+
await driver.wait(until.elementTextContains(await driver.findElement(By.id('relative-location')), ","), 2000);
2020
let result = await driver.findElement(By.id('relative-location')).getText();
2121
console.log('Initial relative location:', result);
2222
result = result.split(', ');

0 commit comments

Comments
 (0)