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