mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
a717b965c1
For instance Duo Push Notification method is not displayed if the API is not configured.
13 lines
400 B
TypeScript
13 lines
400 B
TypeScript
import SeleniumWebDriver, { WebDriver } from "selenium-webdriver";
|
|
|
|
/**
|
|
*
|
|
* @param driver The selenium web driver
|
|
* @param locator The locator of the element to check it does not exist.
|
|
*/
|
|
export default async function(driver: WebDriver, locator: SeleniumWebDriver.Locator) {
|
|
const els = await driver.findElements(locator);
|
|
if (els.length > 0) {
|
|
throw new Error("Element exists.");
|
|
}
|
|
} |