How to get the value inside a div tag in a table using selenium webdriver
<p>I am trying to do automation for one of my application using selenium webdriver. The problem is I am trying to fetch the data from table which contains the value inside a "div" tag.The table is nothing but a calendar.</p>

<p>This is my code for fetching the value from table.(i.e.,div tag)</p>

<pre><code>public boolean webElement_Table_findCellValue_WD(String locatorType, String locatorVal, String cellText){
    boolean elementStatus = false;  
    WebElement tbl = this.getWebElement(locatorType, locatorVal);

    List&lt;WebElement&gt; tbTag=tbl.findElements(By.tagName("table"));

    int num=tbTag.size();
    System.out.println("hhhhhhhhhhhhhhhhhhh"+num);

    for(WebElement tbTagEle: tbTag)
    {
        List&lt;WebElement&gt; trTag=tbTagEle.findElements(By.tagName("tr"));
        System.out.println("iiiiiiiiiiiiii"+trTag.size());

        for(WebElement trTagEle: trTag)
        {
            List&lt;WebElement&gt; tdTag=trTagEle.findElements(By.tagName("td"));
            System.out.println("jjjjjjjjjjjjj"+tdTag.size());
            for(WebElement tdTagEle: tdTag)
            {
                List&lt;WebElement&gt; divTag=tdTagEle.findElements(By.tagName("div"));
                for(WebElement divTagEle: divTag)
                System.out.println("the contents are:"+divTagEle.getText());
            }
        }
    }

    return elementStatus;   

}
</code></pre>

<p>My intention is just to select(click) a date from the calender.(Table) which I will pass it through a properties file.</p>