I am a beginner in the world of test automation and I am looking to retrieve the value from a web element labeled "message-success failed", which displays the message "This customer name already exists".
Here is what the CSS looks like
Even though I attempted the following code, it unfortunately did not succeed:
Console.WriteLine(
PropertiesCollection.driver
.FindElement(
By.ClassName("message-success failed"))
.GetCssValue("li"));
The PropertiesCollection class can be found here:
class PropertiesCollection
{
// Auto-implemented property
public static IWebDriver driver { set; get; }
}