My requirement is 

1. Get all data from grid
2. Search specific text, if found
3. Click check box

My code is,

```
   List<WebElement> totalRows = driver.findElements(By.xpath("//*[@id='ContentPlaceHolder1_ContentPlaceHolderChild_grdGroupSelection']/tbody/tr"));
System.out.println("Total Size: "+totalRows.size());

for (int count=1;count<totalRows.size()-1;count++){

System.out.println("Loop count: "+count);

   WebElement rowElement = totalRows.get(count);

    System.out.println("WebElement Tag name: "+rowElement.getTagName());

```

}

Unable to get the value from rowElement.

Here posted Logs, HTML source & snapshot for reference. Please help me out. Thanks in advance.

Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM
Command duration or timeout: 294 milliseconds
For documentation on this error, please visit: <http://seleniumhq.org/exceptions/stale_element_reference.html>
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'Saravanan-PC', ip: '192.168.101.22', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0\_51'
Session ID: 6ea5596b-9f0f-477b-9a11-dc534a0197ee
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=WINDOWS, databaseEnabled=true, cssSelectorsEnabled=true, javascriptEnabled=true, acceptSslCerts=true, handlesAlerts=true, browserName=firefox, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=35.0.1}]
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
 at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
 at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
 at org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:187)
 at org.openqa.selenium.remote.RemoteWebElement.findElementsByTagName(RemoteWebElement.java:264)
 at org.openqa.selenium.By$ByTagName.findElements(By.java:323)
 at org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:163)
 at com.aetherpal.scripts.ClientPolicyProfiles.selectCreatedCSPGroupID(ClientPolicyProfiles.java:95)
 at com.aetherpal.scripts.ClientPolicyProfiles.main(ClientPolicyProfiles.java:80)
Caused by: org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM
For documentation on this error, please visit: <http://seleniumhq.org/exceptions/stale_element_reference.html>
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'Saravanan-PC', ip: '192.168.101.22', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0\_51'
Driver info: driver.version: unknown
 at .fxdriver.cache.getElementAt(resource://fxdriver/modules/web-element-cache.js:8325:24)
 at .Utils.getElementAt(file:///C:/Users/SARAVA~1/AppData/Local/Temp/anonymous631926879527649788webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:7922:10)
 at .FirefoxDriver.prototype.findElementsInternal\_(file:///C:/Users/SARAVA~1/AppData/Local/Temp/anonymous631926879527649788webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9636:32)
 at .FirefoxDriver.prototype.findChildElements(file:///C:/Users/SARAVA~1/AppData/Local/Temp/anonymous631926879527649788webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9657:3)
 at .DelayedCommand.prototype.executeInternal\_/h(file:///C:/Users/SARAVA~1/AppData/Local/Temp/anonymous631926879527649788webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11612:16)
 at .DelayedCommand.prototype.executeInternal\_(file:///C:/Users/SARAVA~1/AppData/Local/Temp/anonymous631926879527649788webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11617:7)
 at .DelayedCommand.prototype.execute/<(file:///C:/Users/SARAVA~1/AppData/Local/Temp/anonymous631926879527649788webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11559:5)

Grid: 
![Grid](https://i.stack.imgur.com/Daz0c.png)

HTML Source:
![HTML source](https://i.stack.imgur.com/AJxxn.png)