Skip to content

Commit

Permalink
[js] fix flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Sep 16, 2023
1 parent 34e03ad commit 2866578
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions javascript/node/selenium-webdriver/test/firefox_test.js
Expand Up @@ -26,6 +26,7 @@ const { Browser } = require('../')
const { Context } = require('../firefox')
const { Pages, suite } = require('../lib/test')
const { locate } = require('../lib/test/resources')
const { until, By } = require('../index')

const EXT_XPI = locate('common/extensions/webextensions-selenium-example.xpi')
const EXT_UNSIGNED_ZIP = locate(
Expand Down Expand Up @@ -320,9 +321,11 @@ suite(
}

async function verifyWebExtensionWasInstalled() {
let footer = await driver.findElement({
id: 'webextensions-selenium-example',
})
let footer = await driver.wait(
until.elementLocated(By.id('webextensions-selenium-example')),
5000
)

let text = await footer.getText()
assert.strictEqual(
text,
Expand Down

0 comments on commit 2866578

Please sign in to comment.