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.
Select empty option from a drop down
Hi all,
I came across a problem where in there is a need to select an empty option in a dropdown and continue to check if page validates the field or not.
my screen has a dropdown and by default it contains a value when page loads.
but i need to set it as empty and check for the validation error.
i am passing the value from a CSV format, below is the example.
_setSelected(_select(/Status/), $mainrs[$i]["status"]);
In the above example i tried passing space from CSV file, but it does'nt act on that.
If anyone came across this type of issue , please let me know.
I came across a problem where in there is a need to select an empty option in a dropdown and continue to check if page validates the field or not.
my screen has a dropdown and by default it contains a value when page loads.
but i need to set it as empty and check for the validation error.
i am passing the value from a CSV format, below is the example.
_setSelected(_select(/Status/), $mainrs[$i]["status"]);
In the above example i tried passing space from CSV file, but it does'nt act on that.
If anyone came across this type of issue , please let me know.
Comments
Could you paste the HTML code of the dropdown here? (Paste it within [ code ] [ /code ] tags so that it is correctly escaped.)
You can view above tags that specify space.
As i understand i have to paste the above code between tags.
if that is the case, then i can't make a change at code end.
i have to manipulate everthing through SAHI with out changing the app code.
could you please specify any alternative.
With [ code ] [ /code ], I mean use it when you reply on the forum, so that html is properly escaped and the code appears in a box
Anyway, I will need to check why "" did not work. Meanwhile you can use:
This is hacky, ugly and works only in your case, but please bear with it till I fix the issue!
Regards,
Narayan