As a beginner in using Selenium with Java, I encountered an issue related to a symbol in my connected class turning green. I needed to assert whether the symbol actually changed its color.
Below is the code snippet that I used:
Boolean connectionSymbolGreenValue = driver.findElement(By.className("connected")).isEnabled();
System.out.println("Green Signal" + connectionSymbolGreenValue);
Assert.assertTrue(connectionSymbolGreenValue);
Despite trying this code, even if the condition fails, it still returns true. I'm wondering if there's any mistake in my code. Any suggestions for a solution?