cancel
Showing results for 
Search instead for 
Did you mean: 

Using the variables in properties of the Stored Object

Using the variables in properties of the Stored Object

Currently we can use variable only in the Property Checkpoints.

I propose to extend this feature to the Object Checkpoints, too.

 

variables_in_Objects.png

5 Comments
Community Hero

Does this work for you?  It doesn't come up in the wizard but you can edit the checkpoint after you create it and use a variable.

 

variable.png

 

 

Community Hero

Hi Marsha,

 

That is not exactly what I mean. 

 

I have a number of complex objects, which contain a lot of nodes and each node consists of several properties.

Some of properties can have a different values in different tests. E.g. I have a page in application with some textbox. This textbox has a placeholder property. Depending on user type this property can be = "required" or "optional". And there are few similar elements on that page.

 

Currently I need to design the separate object for each test (user type). But if I can assign a variable to the mentioned property value, I need only one object.

Community Hero

We build strings to use variables as part of an object

CodeExpression.png

 

eval("Aliases.QAD_Client.ShellForm.MdiClient." & KeywordTests.MaintainProfile_AddAttributes.Parameters.MappedName &".zmainPanel.BrowseTabbedPageControl.AssociatedControl.zmainContainer.SplitterPanel_1.ztabManager."&KeywordTests.MaintainProfile_AddAttributes.Variables.ProfileDef & ".zmainContainer.SplitterPanel.BrowseControl.zsplitContainer.SplitterPanel_1.DTApplication.DTApplication_Fill_Panel")

 

the MappedName and ProfileDef vary with the section being tested

 

Would something like that help?

 

Community Hero

Hi Marsha,

 

I do not see how to use your approach while creating the Objects in the Stores, because I can't assign a code expression as a value of the property of the stored object. I only can use a constant values.

Community Hero

Maybe this will help.  It's a previous forum post that shows how to update a stored value from a script.  You could update the stored value at the top of the test each time.

 

http://community.smartbear.com/t5/General-Discussions/Variables-in-stored-objects-value/td-p/47856

Announcements
Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Join us and watch the welcome video:
Announcements