I am new to Xpath. What is the following piece of code checking for ? Does it check for both these class "a b" when retrieving span elements.
HtmlSpan resultsSpan =  (HtmlSpan) page.getByXPath("//span[contains(@class,'a b')]").get(0);
Thanks
I am new to Xpath. What is the following piece of code checking for ? Does it check for 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 for a span with class that contains substring "a b". f.e. <span class="ba ba"></span> or <span class="a b"></span>
But if your want to get span with class "a" or class "b" should use 
//span[@class="a" or @class="b")]
