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.

Problem with _getText

LongbowLongbow Members
edited November -1 in Sahi - Open Source
I have a simple text box with random value (the point is that textbox is NOT empty).

When I do something like:
_getText(_textbox("NameOfTextBox"));
I get empty value every time. Am I missing anything here?

Comments

  • OK, I managed to find workaround - just use:
    _textbox("NameOfTheTextBox").value
    
    Since _getText works for many of html elements, wouldn't it make sense if it worked for textbox as well?
  • narayannarayan Administrators
    Makes sense. Will try and add it.
  • Hi

    In Our Application, Confirmation message is displayed as below :

    "Added user Laxshmi."

    I can only pass the test if I can compare the above text with expected result. Can anybody please guide me how to handle this?

    Thanks in advance.

    Regards
    Laxshmi
  • Hi LaxshmiVijay,

    Please create a new forum post.

    You can use:

    _expectConfirm(label, value);

    For more Details:

    http://sahi.co.in/w/_expectConfirm

    Regards
    Sumitra
  • Many Thanks Sumitra.

    I will try and let you know. And will also create new forum post as you suggested.

    Regards
    Laxshmi
Sign In or Register to comment.