mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
14 lines
393 B
TypeScript
14 lines
393 B
TypeScript
|
import SeleniumWebdriver from "selenium-webdriver";
|
||
|
|
||
|
export default async function(driver: any) {
|
||
|
const content = await driver.wait(
|
||
|
SeleniumWebdriver.until.elementLocated(
|
||
|
SeleniumWebdriver.By.tagName('body')), 5000).getText();
|
||
|
|
||
|
if (content.indexOf('This is a very important secret') > - 1) {
|
||
|
return;
|
||
|
}
|
||
|
else {
|
||
|
throw new Error('Secret page is not accessible.');
|
||
|
}
|
||
|
}
|