Getting an error at end of execution of test case each time

WebUI.callTestCase(findTestCase(‘TC_1_login’), [:], FailureHandling.STOP_ON_FAILURE) WebUI.click(findTestObject(‘Page_site/span_Customers’), FailureHandling.STOP_ON_FAILURE) WebUI.click(findTestObject(‘Page_site/a_dev’), FailureHandling.STOP_ON_FAILURE) WebUI.click(findTestObject(‘Page_site/a_Sites (2)’)) ‘Expected value from Table’ String ExpectedValue = ‘test’ WebDriver driver = DriverFactory.getWebDriver() ‘To locate table’ WebElement Table = driver.findElement(By.xpath(‘id(“sites”)/table[@class=“table table-hover”]’)) ‘To locate rows of table it will Capture all the rows available in the table ’ List Rows = Table.findElements(By.tagName(‘tr’)) ‘Find a matching text in a table and performing action’ ‘Loop will execute for all the rows of the table’ Table: for (int i = 0; i < Rows.size(); i++) { ‘To locate columns(cells) of that specific row’ List Cols = Rows.get(i).findElements(By.tagName(‘td’)) for (int j = 0; j < Cols.size(); j++) { ‘Verifying the expected text in the each cell’ if (Cols.get(j).getText().equalsIgnoreCase(ExpectedValue)) { ‘To locate delete anchor in the expected value matched row to perform action’ Cols.get(j).findElement(By.xpath(((’//table[1]//tbody//tr[’ + i) + ‘]//td[6]//i[1]’))).click() // println(“site clicked on edit ------”+ Cols.get(j).getText()) Table: break } } } WebUI.closeBrowser()

above is my code i am trying finding text inside a table and click on a specific text which I want, now i am getting an error. i am not able to get the meaning of error.because of this i got struck.and with the above code,test is executing and performing actions as per required but at last seconds I’m getting an error.
here is the error:- Test Cases/site_TestCases/TC_4 test the update of site with valid data FAILED because (of) (Stack trace: org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document (Session info: chrome=69.0.3497.100) (Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds For documentation on this error, please visit: Selenium Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’ System info: host: ‘', ip: '*’, os.name: ‘Windows 8.1’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.8.0_181’ Driver info: com.kms.katalon.selenium.driver.CChromeDriver Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\ACERPC~1\AppData\L…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 69.0.3497.100, webStorageEnabled: true} Session ID: e987f767d292a456825ff1e009c528a3 *** Element info: {Using=tag name, value=td} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600) at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:20) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:279) at org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:195) at org.openqa.selenium.remote.RemoteWebElement.findElementsByTagName(RemoteWebElement.java:275) at org.openqa.selenium.By$ByTagName.findElements(By.java:327) at org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:171) at org.openqa.selenium.WebElement$findElements.call(Unknown Source) at Script1539687574999.run(Script1539687574999.groovy:47) at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183) at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108) at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294) at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285) at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264) at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256) at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200) at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99) at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:90) at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:149) at TempTestCase1539756207758.run(TempTestCase1539756207758.groovy:22) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) at groovy.lang.GroovyShell.run(GroovyShell.java:518) at groovy.lang.GroovyShell.run(GroovyShell.java:507) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653) at groovy.ui.GroovyMain.run(GroovyMain.java:384) at groovy.ui.GroovyMain.process(GroovyMain.java:370) at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129) at groovy.ui.GroovyMain.main(GroovyMain.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131) )

Try waiting a few seconds before checking the table. WebUI.delay(5)

still getting same error…

please help me, any solutions for this