Forum Discussion

Veroniquelu's avatar
Veroniquelu
Contributor
9 years ago

Is there a way that I could set WebPageObj as a global variable?

webPageObj = Sys.Browser("iexplore*").Page("*");

 

 

I don't want to declare this object everytime I call a function. Is there any way that i could set it as a global variable? I tried the methods in help file. but it keeps failing...

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Yes, this is possible.

    Create a project variable, assign a value to it and use the variable later.

    Doing the same but using the project suite variable makes it possible to have a variable that is global for the whole project suite.

    See TestComplete's help for more info about Project and Project Suite variables.