Automate kendo grid pagination

Hi guys. Wanna ask if anyone has experience dealing with kendo grid pagination?

I have found this guide: TESTING TOOLS QA TRAINING: How can we automate pagination using Selenium Webdriver? Need to click on Next and Previous buttons to iterate through the table.

But I think I have trouble to grab the right element to click on pagination.

The error I keep getting is something like this:

Cannot cast object '[[CChromeDriver: chrome on XP (5e9d280b4855011c75c1aeea23e5c3e2)] -> xpath: //a[@class = "k-link k-pager-nav"]]' with class 'org.openqa.selenium.remote.RemoteWebElement' to class 'java.util.List'

Would really appreciate some help and input. Thanks in advance!

The error message means there is something wrong in your script when casting wrong object type. I think you need to paste the script here to get help.

Thanks for the great reminder. This is my first time using Groovy and I am still not very familiar with it. Apparently the mistake was with the declaration of:

List<WebElement> pagination = Table.findElements(By.xpath("...."))

Apparently I missed the ā€œsā€ in findElement because most of the findElement used in the test case is without the ā€œsā€

Problem solved after adding the s.