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.
Will _span("Text") return multiple elements?
If _span("Text") matches more than one element, will all matching elements be returned, or just the first? And if all are returned, is there a way I could get a count of them?
Comments
You could access say the 5th element by _span("Text[4]")
This is much faster than getting all elements and then returning by index.
It is not easy to count the number of elements right now.
I could add it if you think it will be useful.
May we could add a _spans("Text") which returns all spans in an array. You could then work on the array.
You think that may work?
Similarly, if the same could be done to make a _rows(_table(0),