18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
good practices to test soring features
Hi,
I am trying to find some good way to test sorting features of data grid (table html element).
Do you have any recommendations where to start?
For the beginning I was thinking about comparing 2 first elements from every column but how does it work with strings?
Thanks,
Maciej
I am trying to find some good way to test sorting features of data grid (table html element).
Do you have any recommendations where to start?
For the beginning I was thinking about comparing 2 first elements from every column but how does it work with strings?
Thanks,
Maciej
Comments
Type the following in the Expression Evaluator in the Sahi controller, and verify behavior: -Narayan
Have you think about adding some wrapper layer over Sahi functions, like e.g. one function for verifying sorting in whole table.
That would be kind of framework closer to actual needs, and faster for implementation.
I started thinking about starting some work on such.
One thing is that I have big system to script and not too much time.
Another reason for that - I have thesis to write for my studies and this sounds like good project
Do let us know what functions you think will make Sahi better. Happy for any input!
Feel free to add useful functions to Sahi and share it on the forum.
To get you started on the path, here is how I would proceed on your sorting example.
Approach 1: Approach 2:
If I wanted to make _isColumnSorted a standard Sahi function, I would define the function as in sahi/htdocs/spr/concat.js
and add _isColumnSorted in sahi/config/normal_functions.txt
If I do the above, I can do the same assert as Approach 3:
If I wanted to add an _assertColumnSorted, then I can add to approach 2, and define another function and add _assertColumnSorted to sahi/config/scheduler_functions.txt
It is 1:30 in the night now and this may have mistakes. I will have a look again in the morning.
-Narayan