Forum Discussion

KP13's avatar
KP13
Occasional Contributor
6 years ago
Solved

Automation Test flow execution between desktop and web module and visa-versa in TestComplete

I have few test scenarios which flow from desktop application to web page and visa-versa.

Could you please share any effective way to automate those type of test scenarios using TestComplete Desktop & Web module.

  • Projects are run separately.  Think of them as unique executable test runs that are, effectively, self contained.  You can't run the two projects in a way that will switch back and forth between tests.  In order to run the type of flow you want, you need to have your tests for both web and desktop portions in the same project if you want to run it on the same machine.

8 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Assuming that you have both, Desktop and Web modules licenses for TestComplete, there is nothing special in such testing. You are obtaining references to the processes that you need to interact with and do what you need.

    Sample pseudo-code:

    var oDsk = Sys.Process("MyDesktop");

    var oMainWnd = oDsk.MainWindow;

    var page = Sys.Browser("chrome").Page("www.myTestedPage");

     

    oMainWnd.btnWatchLoggedInUsers.Click();

     

    page.LoginName.Keys("myLogin");

    page.LoginPwd.Keys("mySecurePwd");

    page.btnSubmit.Click();

     

    oMainWnd.LoggedInUsersForm.btnRefresh.Click();

    ...

    • KP13's avatar
      KP13
      Occasional Contributor

      Thanks, Alex for your valuable reply...!!!

      I have another query related to this. i.e. As I have to create 2 projects (1 desktop module project & 1 web module project), how will I change the test flow control from desktop to the web or vice-versa. And in which project the test result will be created.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Projects are run separately.  Think of them as unique executable test runs that are, effectively, self contained.  You can't run the two projects in a way that will switch back and forth between tests.  In order to run the type of flow you want, you need to have your tests for both web and desktop portions in the same project if you want to run it on the same machine.