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.
Nullify Textbox
Hi!, I have the following problem: I work with a form with textboxes; sometimes I need to delete the content of a textbox, for then save the values of that fields as null. For that I use:
_setValue(_textbox("box1"), "");
With this, I can see, visually, that the textbox is set to empty. But when I save the record, is saved with the previous value of the field. If I do the same thing manually, is working fine. I dont know why is not working with the script.
I also try with:
_setValue(_textbox("box1"), " ");
That is working for textboxes used for strings, but not when the textboxes are used for dates (because a validation of the system dont allow the save an space in a date field).
There is any other way to set the value of a textbox as empty?
Thanks,
MagUi
_setValue(_textbox("box1"), "");
With this, I can see, visually, that the textbox is set to empty. But when I save the record, is saved with the previous value of the field. If I do the same thing manually, is working fine. I dont know why is not working with the script.
I also try with:
_setValue(_textbox("box1"), " ");
That is working for textboxes used for strings, but not when the textboxes are used for dates (because a validation of the system dont allow the save an space in a date field).
There is any other way to set the value of a textbox as empty?
Thanks,
MagUi
Comments
_setValue(_textbox("box1"), "\u000D");
Whit this I avoid the problem mentioned.