Forum Discussion

nedbacan's avatar
nedbacan
Frequent Contributor
2 years ago

How to run a TestComplete test between mutiple instance of Chrome using different user profile

Hello. In Test Complete, Is it possible to open two instances of Chrome at the same time using different user profile, and executing the tests between both profiles?   The reason of my question is...
  • AlexKaras's avatar
    AlexKaras
    2 years ago

    To nedbacan :

     

    rraghvani wrote: "I've defined two alias name mappings for each of the two browsers."

    Actually, you are not required to create two aliases because this will duplicate child objects hierarchy with seems to be identical otherwise.

    The task that you must solve is: you must configure alias for the browser and/or for the displayed page so that it becomes possible to distinguish between them during runtime.

    As an example, you may use process index to distinguish between two browsers.

    To do this:

    -- Create, for example, temporary project variable called iBrowserIndex;

    -- Edit identification parameters for the browser object in NameMapping so that they (parameters) include process index property and set iBrowserIndex variable as a value for this property;

    -- Now, during runtime, start first browser, get a reference to its process (using 

    Browsers.CurrentBrowser call, for example) and store somewhere the value of its process index;

    -- Start second browser and also store the value of its process index;

    -- Now, depending on with what browser your test code needs to work, assign the value of the stored process index to the iBrowserIndex variable.