im trying to verify that a
is displayed in red i cant access the css color property and when i try to use ele.getCSSProperty("color") the value is [object object] for some reason
let alert = await $("#newPass-help-block");
let alertExist = await alert.isExisting();
let sAlert = await $("#serverError");
let sAlertExist = await sAlert.isExisting();
if (sAlertExist == true) {
const sAlertColor = await sAlert.getCSSProperty("color")
console.log("Your password either is the same as your username");
console.log("or is the same as your last 5 passwords");
console.log(sAlertColor);
}
else if (alertExist == true) {
const alertColor = await alert.getCSSProperty("color")
console.log("Invalid Password");
console.log(alertColor);
if (invalidPass.length<8) {
console.log("Password length is not meeting the requirements");
}
else{
console.log("Password most contain letters numbers and symbols");
}
}
the rgba color property do appear on the terminal but not by the console log
[0-0] 2022-05-27T15:24:03.965Z INFO webdriver: RESULT rgba(255, 12, 62, 1)