18 January 2026:


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 delete or clear text from textfield with sahi?

sujatasujata Members
edited October 2013 in Sahi - Open Source
Hi
I want to delete or clear the text form any particular field.
_clearText(_textbox("/TitleTextBox/"), "ss");
_deleteText(_textbox("/TitleTextBox/"), "ss");

But both are not working.

Answers

  • Hi Sujata,
    Please use the following code:
    _setValue(_textbox("/TitleTextBox/"), "");
    

    This will set the value of your textfield with blank.
    Note: _clearText or _deleteText are not Sahi APIs.

    Regards.
Sign In or Register to comment.