Forum Discussion

nishantranjan's avatar
nishantranjan
New Contributor
55 minutes 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.

3 Replies

  • 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?

  • 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?