public String getText ( WebElement element ) { String text = element . getText ( ) ; if ( text != null ) { // Safari driver does not return &nbsp; as normal spacce, while others do text = text . replace ( NON_BREAKING_SPACE , ' ' ) ; // Safari driver does not return trim, while others do text = text . trim ( ) ; } return text ; }
Gets element s text content .