java - XPath contains returning IndexOutOfBounds Exception -
i new xpath. following piece of code checking ? check both these class "a b" when retrieving span elements.
htmlspan resultsspan = (htmlspan) page.getbyxpath("//span[contains(@class,'a b')]").get(0); thanks
this xpath //span[contains(@class,'a b')]" looks span class contains substring "a b". f.e. <span class="ba ba"></span> or <span class="a b"></span> if want span class "a" or class "b" should use //span[@class="a" or @class="b")]
Comments
Post a Comment