fbpx

Get your 6-month No-Cost Opt-Out offer for Unlimited software automation!

Launch WPF app, caused process starts in Backgroun

Launch WPF app, caused process starts in Backgroun

Home Forums Ask Expert Launch WPF app, caused process starts in Backgroun

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31215
    shin k
    Participant

      Hi There,

      I’m using Free Trial and try to use with WPF Windows 10 Desktop application. It’s a generic WPF application, double click EXE manually will start the app and show the login screen as expected.

      However, using the Launch command is not causing any error. But the process will be run in background
      (check with Windows Task Manager, the process EXE name didn’t show under Apps section, it showed under Background Processes.
      Capture2.JPG
      Unlike when double click EXE directly, the process start under Apps section and UI display to user almost instantaneously). Therefore the subsequent Click on Object is always hung there. Yellow line stuck at Click Line for a long time (looks like it can’t find the object and wait for timeout).
      Capture.JPG

      Please suggest. Regards,

      Here is my script.
      *******************
      Application(“CID”).Launch “D:DownloadCID_demoCIDApplication.exe”
      wait 10
      Application(“CID”).View(“login”).Object(“Login”).Click
      wait 5
      If Application(“CID”).View(“LoginError”).Object(“Please Input UserId and Passwo”).Exist then
      Application(“CID”).View(“LoginError”).Object(“OK”).Click
      end if

      #31217
      Valentin ZAP
      Keymaster

        Good morning, Shinnapongk!

        ZAPTEST completely supports execution WPF application. But you should keep in mind that ZAPTEST doesn’t change “Working Directory” and your application could use it.

        As a solution you should use “Shortcut” on your real executable file:

        1. Right Mouse Click on your file -> “Copy”
        2. [li]Right Mouse Click on empty space -> “Paste shortcut”[/li]

        For example we have the WPF application: “WpfApplication2.exe:, so we will get the default shortcut name: “WpfApplication2 – Shortcut.lnk”.

        Now instead of launching your executable file just launch your shortcut:

        Application("Application").Launch "C:UsersAndreyDesktopwpfWpfApplication2 - Shortcut.lnk"

        Also you could apply some specific settings for your shortcut. Hope it works for you.

        Thank you,
        ZAPTEST Team

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.