2019-02-09 22:20:37 +00:00
|
|
|
import SeleniumWebdriver, { WebDriver } from "selenium-webdriver";
|
2019-01-30 15:47:03 +00:00
|
|
|
import Assert = require("assert");
|
|
|
|
|
|
|
|
export default async function(driver: WebDriver, type: string, message: string) {
|
|
|
|
await driver.wait(SeleniumWebdriver.until.elementLocated(SeleniumWebdriver.By.className("notification")), 5000)
|
|
|
|
const notificationEl = driver.findElement(SeleniumWebdriver.By.className("notification"));
|
|
|
|
const txt = await notificationEl.getText();
|
|
|
|
Assert.equal(message, txt);
|
|
|
|
}
|