public int size ( ) { int size = 0 ; try { if ( getParent ( ) != null ) { size = getParent ( ) . locateChildElements ( getLocator ( ) ) . size ( ) ; } else { size = HtmlElementUtils . locateElements ( getLocator ( ) ) . size ( ) ; } } catch ( NoSuchElementException e ) { // NOSONAR // do nothing, let size be returned as 0 } return size ; }
Returns the number of containers found on the page .