Ask a Question

what is returned into the Project.Variables.objcontext??

newtotc
Occasional Contributor

what is returned into the Project.Variables.objcontext??

''''function to set project.variables.objcontext

Public Function projvarobjctxt


  if Project.Variables.BrowserName = "IE" then

    set Context1 = sys.process("iexplore").Page("*")

    'To validate loading of login page 

      set Context1 = Sys.Browser("iexplore").Page("*")

  else

      if (Project.Variables.BrowserName= "firefox") then

        set Context1 = sys.process("firefox").Page("*")

      else

        set Context1 = Sys.Browser("iexplore").Page("*")

        log.Message ("Unknown Browser specified. Page loaded in Internet Explorer")

      end if

  end If

    Project.Variables.objContext = Context1


end function



I want to know what is returned into the variable Project.Variables.objcontext ??

Is it a url or the page object or what...



thanks for your help



thanks



2 REPLIES 2
irina_lukina
Super Contributor

Hi,


As far as I can see from your code, the objcontext project variable contains the reference to the Page object.


If you need to ensure that the specified variable contains this object during the test execution, you can follow the steps below:

1. Set a breakpoint on the last line of your code.

2. When the script stops on this line, highlight the Project.Variables.objContext object in your code and click the Call the Evaluation Dialog button on the Debug toolbar.

3. TestComplete will show the Evaluate dialog.

4. Click Inspect in this dialog to explore the properties of the returned object.


I hope it helps 🙂

I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
newtotc
Occasional Contributor

Thank you irina



Thanks

AN
cancel
Showing results for 
Search instead for 
Did you mean: