[JS] Fix window test in firefox
@@ -44,7 +44,7 @@ test.suite(function (env) {
it('can set size of the current window from frame', async function () {
await driver.get(test.Pages.framesetPage)
- var frame = await driver.findElement({ css: 'frame[name="fourth"]' })
+ const frame = await driver.findElement({ css: 'frame[name="fourth"]' })
await driver.switchTo().frame(frame)
await changeSizeBy(-20, -20)
})
@@ -52,7 +52,7 @@ test.suite(function (env) {
it('can set size of the current window from iframe', async function () {
await driver.get(test.Pages.iframePage)
- var frame = await driver.findElement({ css: 'iframe[name="iframe1-name"]' })
+ const frame = await driver.findElement({ css: 'iframe[name="iframe1-name"]' })
await driver.switchTo().frame(frame)
await changeSizeBy(-20, -20)
})
@@ -85,7 +85,7 @@ test.suite(function (env) {
height: 480,
})
- return driver.wait(forPositionToBe(newX, newY), 1000)
+ await driver.wait(forPositionToBe(newX, newY), 1000)
})
it('can set the window position from a frame', async function () {
@@ -99,7 +99,7 @@ test.suite(function (env) {
y += 10
await driver.manage().window().setRect({ width: 640, height: 480, x, y })
- return driver.wait(forPositionToBe(x, y), 1000)
+ await driver.wait(forPositionToBe(x, y), 1000)
})
it('can open a new window', async function () {
@@ -136,7 +136,7 @@ test.suite(function (env) {
if (rect.width === width && rect.height === height) {
return
}
- return driver.wait(forSizeToBe(width, height), 1000)
+ return await driver.wait(forSizeToBe(width, height), 1000)
}
function forSizeToBe(w, h) {
