Updated check for Login Button
This commit is contained in:
Binary file not shown.
355
package-lock.json
generated
355
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chromedriver": "^126.0.4",
|
||||
"chromedriver": "^129.0.2",
|
||||
"express": "^4.19.2",
|
||||
"geckodriver": "^4.4.1",
|
||||
"nodemon": "^3.1.0",
|
||||
|
||||
@@ -85,13 +85,13 @@ const ExACT_landingPage = (req, res) => {
|
||||
}
|
||||
|
||||
// Check if landing page test was successful
|
||||
const logoutButton = await driver.wait(until.elementLocated(By.id('headerContainer')), 5000).catch(() => false);
|
||||
const loginButton = await driver.wait(until.elementLocated(By.css('.login')), 5000).catch(() => false);
|
||||
|
||||
if (logoutButton) {
|
||||
console.log('Login successful');
|
||||
if (loginButton) {
|
||||
console.log('Login button present');
|
||||
testStatus = 'Passed';
|
||||
} else {
|
||||
console.log('Login failed');
|
||||
console.log('Login button not found');
|
||||
}
|
||||
|
||||
// Log test end time
|
||||
|
||||
Reference in New Issue
Block a user