mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 09:01:39 -05:00
Return ThenableWebDriver back
This commit is contained in:
parent
0b29a79131
commit
5d9c5bec15
1 changed files with 6 additions and 3 deletions
|
@ -8,7 +8,7 @@ import * as path from "path"
|
||||||
import * as webdriver from "selenium-webdriver"
|
import * as webdriver from "selenium-webdriver"
|
||||||
import * as Until from "selenium-webdriver/lib/until"
|
import * as Until from "selenium-webdriver/lib/until"
|
||||||
const {By} = webdriver
|
const {By} = webdriver
|
||||||
import {Options, Driver} from "selenium-webdriver/firefox"
|
import {Options} from "selenium-webdriver/firefox"
|
||||||
|
|
||||||
import { getNewestFileIn, sendKeys } from "./utils";
|
import { getNewestFileIn, sendKeys } from "./utils";
|
||||||
|
|
||||||
|
@ -32,11 +32,14 @@ describe("webdriver", () => {
|
||||||
|
|
||||||
const options = (new Options())
|
const options = (new Options())
|
||||||
.setPreference("xpinstall.signatures.required", false)
|
.setPreference("xpinstall.signatures.required", false)
|
||||||
|
.addExtensions(extensionPath)
|
||||||
if (env["HEADLESS"]) {
|
if (env["HEADLESS"]) {
|
||||||
options.headless();
|
options.headless();
|
||||||
}
|
}
|
||||||
const driver = Driver.createSession(options)
|
const driver = new webdriver.Builder()
|
||||||
await driver.installAddon(extensionPath, /*temporary*/true)
|
.forBrowser("firefox")
|
||||||
|
.setFirefoxOptions(options)
|
||||||
|
.build()
|
||||||
// Wait until addon is loaded and :tutor is displayed
|
// Wait until addon is loaded and :tutor is displayed
|
||||||
await iframeLoaded(driver)
|
await iframeLoaded(driver)
|
||||||
// And wait a bit more otherwise Tridactyl won't be happy
|
// And wait a bit more otherwise Tridactyl won't be happy
|
||||||
|
|
Loading…
Add table
Reference in a new issue