Ask a Question

Use of project persistent variables as common variable across multiple test scripts.

SOLVED
Azeddin_Margani
Contributor

Use of project persistent variables as common variable across multiple test scripts.

Hi, 

Could someone assist with my following question, 

i need to use project persistent variable so that it can be used across multiple test scripts' execution. 

1. The variable is a container or controler which i will need to use "findChild" function to access other objects.

2. Then, in the actual script, i will write something like.

    var Crl = project.variables.Controler;

    var button1 = Crl.findChild ("Text", "Basket", 1000);  //in this case, the "findChild" function is not responding or couldn't be used to find button1 ?

 

The reason of having the "Controler" defined in the project variables is that because it keeps changing across all of the test scripts - and thought is better to have it defined in one place as project persistent or global variable. 

 

Can this be done?

Many Thanks, 

A.M.

 

A.M.
1 REPLY 1
Marsha_R
Champion Level 2

Yes it can be done. Here's some information on how the different variables are used:

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/common/variables-page...

cancel
Showing results for 
Search instead for 
Did you mean: