How to get the pagination size
I have table with 25 rows and 10 pages .. to navigate between pages i have pagination like this
First Previous 1 2 3 4 5 ... Next Last
when i am in 1 st page First and previous are in disabled and when i click on ... next set of page no will be displayed ..
when i am in 2 nd page First and previous are in active..
How do i write an automation test to test this?
Please suggest me a way. I need to write this test in Geb.
I think this is too much of an UI test to want to do it in selenium. I'd recommend doing this in a JS unit test. They run much faster, easy to do cross browser, and less finicky and less timing issues than a selenium test.
If you have to do it in selenium, you can use the getAttribute() method to get the "class" or "disabled" property. I think most css frameworks will add a ".disabled" to the class property when an element is disabled. However if you're testing a single page app, the intelligent wait part may be tricky. Usually, you end up either putting in a hard coded wait, or a wait for element to turn stale for waiting on the results refresh to happen.