mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
12 lines
405 B
TypeScript
12 lines
405 B
TypeScript
import SeleniumWebdriver = require("selenium-webdriver");
|
|
import Bluebird = require("bluebird");
|
|
|
|
export default function(driver: any) {
|
|
return driver.findElement(
|
|
SeleniumWebdriver.By.tagName('h1')).getText()
|
|
.then(function(content: string) {
|
|
return (content.indexOf('Secret') > -1)
|
|
? Bluebird.resolve()
|
|
: Bluebird.reject(new Error("Secret is not accessible."));
|
|
})
|
|
} |