cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Textbox's value with Aliases

tuanvinh1008
Contributor

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 3
vinniew
Staff

Re: Getting Textbox's value with Aliases

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
Contributor

Re: Getting Textbox's value with Aliases

Thanks for reply

I solved this concern. I used the command

Aliases.control.wText instead of get_Text

 

thanks,

vinniew
Staff

Re: Getting Textbox's value with Aliases

Glad to hear @tuanvinh1008 , its a good reference point none the less! 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors