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.
Problem after getting the length of items in dropdwn list
Hi,
I am facing a problem. In the following code I'm getting the count of items in a drop down list in the variable $Options. But cannot get into the loop.
$Options = _select("/ddlNoteType/").length;
_alert($Options);
for($i=1; $i <= $Options; $i++)
{
_alert($i);
}
What is the issue? Please help me.
I am facing a problem. In the following code I'm getting the count of items in a drop down list in the variable $Options. But cannot get into the loop.
$Options = _select("/ddlNoteType/").length;
_alert($Options);
for($i=1; $i <= $Options; $i++)
{
_alert($i);
}
What is the issue? Please help me.
This discussion has been closed.
Comments
you will have to use _select("/ddlNoteType/").options.length;
Regards
Wormi
If you want all the dropdown lists then the code should be:
Check if this solves your issue.
Regards
Sumitra