Forum Discussion

tuanvinh1008's avatar
tuanvinh1008
Contributor
4 years ago

Getting Textbox's value with Aliases

Hi all,

I think my question is very simple. But I don't know why I can't get the value of textbox with this code

 

Aliases.AccountMain.gbAccountKeyDetails.txtNumber.get_Text();

 

it returns to an object. but I think it should return a string (the value of textbox). I also see the property (wText) contains the value that I want to get. But don't know how to get this property with Aliases.

 

Thanks,

Vinh

3 Replies

  • Hi tuanvinh1008 

     

    Thanks for posting. 

     

    It can depend if the attributes are available in the control. 

     

    I would use the property checkpoint operation. 

     

    Using this wizard you can easily see what string based attributes are available to use. 

     

    If your scripting you can convert the operation into a script however using the operation alone will give you insight into what attributes/properties to use

     

    https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/property/about.html

     

    The above link shows how to conifgure property based checkpoints. 

     

    Thanks 

     

    Vinnie

    • tuanvinh1008's avatar
      tuanvinh1008
      Contributor

      Thanks for reply

      I solved this concern. I used the command

      Aliases.control.wText instead of get_Text

       

      thanks,