I want to print list of element within a loop : <p>I have some List of web element and I want to print all the elements inside one loop.How can I do this?.I am not sure how to do..Below i put my code that is not work.. Any help will be appreciated</p>

<pre><code>List&lt;WebElement&gt; Pid=wd.findElements(By.xpath(".//*[@class='optimizely-propertyid recommend-row-target']"));
List&lt;WebElement&gt; Ptitle=wd.findElements(By.xpath(".//*[@class='see-the-world-des listing-thumb-title property-wide-block-title']/a"));
List&lt;WebElement&gt; Pprice=wd.findElements(By.xpath(".//*[@class='see-the-world-price-image list-view']/a/span"));
List&lt;WebElement&gt; psleeps=wd.findElements(By.xpath(".//*[@class='see-the-world-price with-rating']/span/a"));
List&lt;WebElement&gt; Prating=wd.findElements(By.xpath(".//*[@class='rating-text']"));

for(WebElement e:Pid){

    System.out.println(e.getText());

    System.out.println(e.Ptitle.getText());
    System.out.println(Pprice.getText());


}
</code></pre>
