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.
How to get all the elements from a "Div" or "area" ?
Hi,
How do i get all the elements in the Div/Area ??
There was an extra textbox appearing, So i want to check if No of textboxes present under the "Div" are 3 and not 4.
How could this be done in JAVA??
Thanks in advance!!
Regards,
Akshada
How do i get all the elements in the Div/Area ??
There was an extra textbox appearing, So i want to check if No of textboxes present under the "Div" are 3 and not 4.
How could this be done in JAVA??
Thanks in advance!!
Regards,
Akshada
Comments
Regards,
Narayan
i hope this will help you to get all the elements present under specific area/ div
_collect("_link", "/./", _in(_div("divID")));
in this line i have used "_link" to get the link information, in the same way you have to mention the required object instead of link
******************************************************************************
var $all_Links = _collect("_link", "/./", _in(_div("divID")));
var $each_Link = [];
for (var $i=0; $i<$all_Links.length; $i++) {
_set($each_Link[$i], $all_Links[$i].id);
}
for (var $i=0; $i<$each_Link.length; $i++) {
_alert($each_Link[$i]);
}
****************************************************************************
Thanks for your reply.
But i cant collect elements in JAVA. There is just the collectSimilar function which gives me similar elements of that type.
How do i do this in Java??
Regards
Akshada