Selenium: getCssValue(“display”)

Last updated on:

Here is how to get CSS value of the "display" and compare it with expected.

    String test = debugPanelContainer.displayNone.getCssValue("display").toString();
        String test2 = "none";
        if (test.equals(test2)){
          debugPanelContainer.hideDebugPanel.click();
        } else {
            System.out.println("ooops");
        }
View Comments

Leave a Comment

Use markdown or basic HTML and be nice.