Forum Discussion

nishantranjan's avatar
nishantranjan
New Contributor
10 hours ago

Issue in launching ClickOnce application from Window Task scheduler

I am currently using the 15 day trial version of TestComplete to automate a test flow for my existing application, and I have successfully set up the automation — it works as expected when run directly through TestComplete or running using command prompt

However, I am encountering an issue when triggering the same test via the Windows Task Scheduler.

Here is what my test is designed to do:

  1. Launch a URL that downloads a ClickOnce application to the Downloads folder.
  2. Launch the downloaded ClickOnce application. (Doesn't Install)
  3. Log in to the application.
  4. Perform a set of predefined activities.
  5. Exit the application.

The problem: When the test is executed through Windows Task Scheduler, the URL launches successfully and the application downloads as expected. However, the ClickOnce application never launches after the download completes and my Test fails. I have tried by setting "Run only when user is logged on" in Task scheduler but it doesn't resolve the issue.

Could you please advise:

  • Are there any known limitations with TestComplete and ClickOnce applications when executed via Windows Task Scheduler?
  • Is there a recommended workaround or configuration to resolve this issue?

Any guidance would be greatly appreciated.

4 Replies

  • Just think like this. We have exe. we double click it to run and then perform what ever we want to do.
    In my case, Instead of exe i have clickonce.application which on doubleclick launches the application. Scheduler starts the script, downloads the appliction but This doubleclick action to launch my application is not working from task scheduler.

    Every thing works perfectly when running script directly from TestComplete or using command prompt , but when i use the command to run my script from task scheduler then it doesn't launch application.

  • No Error message. It doesn't launch the application and next step is login. it doesn't find any window/textbox to fill username so it returns error that username textbox not found.

    When running the same script directly from Test Complete then every thing is working fine.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      Just for my understanding. Why is it necessary to automate ClickOnce application? Is that your UAT application?

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    What is the exact message that appears when your test fails?

    Can the ClickOnce app be automated by TestComplete?