Forum Discussion

DevChaminda's avatar
DevChaminda
Occasional Contributor
12 years ago

wText method not retrieve all the text data values



I am using “wText” method to retrieve large
text value from the textarea field.


I am not getting all the text values
from the textarea when using “wText” method.


What is the solution to get all the
textarea value, rather than using “wText” method?







3 Replies

  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Dev,


    It's a bit difficult to solve the problem without knowing which textarea control you are testing. Is it a Java Swing TextArea control or another control? Could you please give the exact name of your textarea control?

    Thanks in advance.

    Still, if TestComplete provides access to your textarea control's native properties and methods, you can try to use them to retrieve the stored text. To learn how to work with the control's native properties and methods in tests, please see the About Open Applications section in TestComplete's Help.

    Please let us know whether this helps.

    Thank you.

  • DevChaminda's avatar
    DevChaminda
    Occasional Contributor
    Hi Julia,



    I have testing window application which is build by using C# DotNet.



    Testcomplete mapping with the application textarea as followed.

    Sys.Process("AirTestHarness").WinFormsObject("frmPreprocessTestInterface").WinFormsObject("gbOutput").WinFormsObject("txtOutput")



    Initial this text area is empty, but after performing some action this text area get fill by system messages. I am using "wtext" method to retrive those text message as below.



    Set my_textarea = Sys.Process("AirTestHarness").WinFormsObject("frmPreprocessTestInterface").WinFormsObject("gbOutput").WinFormsObject("txtOutput")



    my_data1 = my_textarea.wText



    Issue is I am not getting all the text massages into "my_data1" variable.


  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Dev,


    Thank you for the details.


    You can try obtaining the text by using the native Text property or the native get_Text method of the WinFormsObject("txtOutput") object.

    For example:

    Set my_textarea = Sys.Process("AirTestHarness").WinFormsObject("frmPreprocessTestInterface").WinFormsObject("gbOutput").WinFormsObject("txtOutput")

    ' Obtains the control's text by using the Text property

    my_data1 = my_textarea.Text


    Or

    Set my_textarea = Sys.Process("AirTestHarness").WinFormsObject("frmPreprocessTestInterface").WinFormsObject("gbOutput").WinFormsObject("txtOutput")

    ' Obtains the control's text by using the get_Text method

    my_data1 = my_textarea.get_Text


    Do they return a correct value? Do any errors occur?

    Please let us know your results.


    Thank you.