mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
8 lines
344 B
TypeScript
8 lines
344 B
TypeScript
|
import SeleniumWebdriver, { WebDriver } from "selenium-webdriver";
|
||
|
|
||
|
export default async function(driver: WebDriver, text: string, timeout: number = 5000) {
|
||
|
const element = await driver.wait(
|
||
|
SeleniumWebdriver.until.elementLocated(
|
||
|
SeleniumWebdriver.By.xpath("//button[text()='" + text + "']")), timeout)
|
||
|
await element.click();
|
||
|
};
|