mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
13 lines
465 B
TypeScript
13 lines
465 B
TypeScript
|
import SeleniumWebdriver = require("selenium-webdriver");
|
||
|
|
||
|
export default function(driver: any, buttonText: string) {
|
||
|
return driver.wait(
|
||
|
SeleniumWebdriver.until.elementLocated(
|
||
|
SeleniumWebdriver.By.tagName("button")), 5000)
|
||
|
.then(function () {
|
||
|
return driver
|
||
|
.findElement(SeleniumWebdriver.By.tagName("button"))
|
||
|
.findElement(SeleniumWebdriver.By.xpath("//button[contains(.,'" + buttonText + "')]"))
|
||
|
.click();
|
||
|
});
|
||
|
};
|