public String css ( String attribute ) { if ( ! element . is ( ) . present ( ) ) { return null ; } try { WebElement webElement = element . getWebElement ( ) ; return webElement . getCssValue ( attribute ) ; } catch ( NoSuchMethodError | Exception e ) { log . warn ( e ) ; return null ; } }
Retrieves the provided css attribute of the element . If the element isn t present the css attribute doesn t exist or the attributes can t be accessed a null value will be returned .