Fix login

This commit is contained in:
Girish Ramakrishnan 2024-04-16 11:47:28 +02:00
parent de1564514e
commit 01ba918473

View file

@ -57,11 +57,11 @@ describe('Application life cycle test', function () {
}
async function login() {
await browser.get(`https://${app.fqdn}/login`);
await waitForElement(By.xpath('//input[@name="username"]'));
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
await browser.findElement(By.id('login')).click();
await browser.get(`https://${app.fqdn}`);
await waitForElement(By.id('inputUsername'));
await browser.findElement(By.id('inputUsername')).sendKeys(username);
await browser.findElement(By.id('inputPassword')).sendKeys(password);
await browser.findElement(By.id('loginSubmitButton')).click();
await waitForElement(By.xpath('//a[text()="Alerts"]'));
}