public static String getXPathForRowByValueInOtherColumn ( String selectIndex , String value ) { return String . format ( "/tr[td[%1$s]/descendant-or-self::text()[normalized(.)='%2$s']]" , selectIndex , value ) ; }
Creates an XPath expression - segment that will find a row selecting the row based on the text in a specific column .