https://paste.ofcode.org/kAfW4zJk2Vt45YEkKzhPDv

if (rowList.size() == 0) I click on column name and wait case will appear. When rowList.size() != 0 my test should go to  if (verifyRow(predicates, i)) { if true to this action in method,  }else if (!verifyRow(predicates, i)){ my method should click on selector 10 times and wait 10s after click and wait untill case will appear.

If case after clicking will appear then my test should do

List<WebElement> row = rowList.get(i);
                    WebElement cell = row.get(1);
                    action.doubleClick(cell).perform();
                    selectionResult.addMatchedRow(i);

this action.

For now I have error

org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document (Session info: chrome=81.0.4044.138) For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

HERE:

  }else if (!verifyRow(predicates, i)){
                    for (int j = 0; j < 10; j++) {
                        try {
                            getDriver().findElement(selector).click();
                        } catch (StaleElementReferenceException e) {
                            //  HERE I HAVE ERROR

                        }

Loop works once and then i get error.