title: Firepath shows matching nodes but does not print
body: <p>I am trying to capture the prices in a list and print them. However the execution stops in the search result page and does not print the prices. I think it is because of the level of Xpath (probably I am not selecting from the upper levels?). I am confused because the Xpath I have created, when I use that in the Firepath it selects 39 matching nodes. </p>
  
  <p>Thanks in advance for your time and advice. </p>
  
  <p>Code: </p>
  
  <pre><code>import java.util.List;
  
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.firefox.FirefoxDriver;
  
  public class Flight {
  
      public static WebDriver driver;
  
      //This following section is for browser and getting the url
      public static WebDriver browser(){
  
          driver= new FirefoxDriver();
  
          driver.get("https://www.orbitz.com/Flights");
          return driver;
  
      }
  
      //this following section is getting the properties of the page      
      public static void  getPageProperties(String ff,String ft, String fd, String rd){
  
          WebElement flyFrom= driver.findElement(By.id("flight-origin"));
          WebElement flyTo= driver.findElement(By.id("flight-destination"));
          WebElement flyDate= driver.findElement(By.id("flight-departing"));
          WebElement returnDate= driver.findElement(By.id("flight-returning"));
          WebElement flight_search_btn= driver.findElement(By.id("search-button"));
  
          flyFrom.sendKeys(ff);
          flyTo.sendKeys(ft);
          flyDate.sendKeys(fd);
          returnDate.sendKeys(rd);
          flight_search_btn.click();
  
      }
  
      // this following section will have the arguments that we will provide for flight search
      public static void testFligthSearch(){
  
          Flight f= new Flight();
          f.browser();
          f.getPageProperties("MSP", "SEA", "05/01/2017", "05/05/2017");
  
          List&lt;WebElement&gt; pricelist= driver.findElements(By.xpath("//span[contains(@class,'dollars')]"));
  
          for(WebElement e: pricelist){
  
              System.out.println("The prices are: " + e.getText());
          }
  
      }
  
      public static void main (String [] args){
  
          Flight f= new Flight();
          f.testFligthSearch();
  
      }
  }
  </code></pre>
  
  <p>Problem: No price is printed.</p>