Code Snippet for how to Read Data or HTML table Using WebDriver
WebElement tab=driver.findElement(By. xpath("//table[@id=' availabilityTable1']"));
List<WebElement> tableRows = tab.findElements(By.tagName(" tr"));
{
for(WebElement cell:tableRows)
{
{
List<WebElement>data=cell. findElements(By.xpath("//td[5] "));//Reading 5th Column of the Table
for(WebElement d:data)
{
System.out.println(d.getText() );
}
break;
Neeraj Bakhtani,i want ur email id,could u pls give me so that i can solve all my issues.my emailid rahasrk@gmail.com
ReplyDeleteThank u
Rani....
Put your all queries here
DeleteI will look into it and will share solutions with you.
Thanks