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.
Clear an object
Is there a way to clear an Object(text field or select_list), the way we have in watir (.clear method)??
Comments
I am not clear about your requirement but if you want to clear the value present in the text field (provided it is editable) you can simply do:
_setValue(_textarea("ID"), "");
Please elaborate if this is not what you require.
Regards,
Pankaj
I did that already for the Text field but what do i do for select_list/drop downs??
In watir I could use a simple ".clear", but can't figure out what to do in Sahi.
Use similar approach for Select list also.
suppose the first option in select list is "Choose one..." (the default selected value)
then you can use this:
_setSelected(_select("name or ID"), "Choose one...");
Regards,
Pankaj
So that means there is no direct method to do that. But in the case of Select Lists, it might be possible that there are no default options selected and that initially none of the options in the list are selected.