From 01ba91847310706a4bf72111e48d5955751247fe Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 16 Apr 2024 11:47:28 +0200 Subject: [PATCH] Fix login --- test/test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test.js b/test/test.js index 8f9a2ff..4f74679 100755 --- a/test/test.js +++ b/test/test.js @@ -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"]')); }