title: How to Set DesiredCapabilities for a WPF App
body: <p>I have developed a simple WPF applicaiton. I want to do some UI automation testing on my app. I started following <a href="https://medium.com/@yostane/automated-ui-testing-of-a-uwp-app-using-appium-dc10d8df6631" rel="nofollow noreferrer">this tutorial</a> on how to do automation using Appium and Windows Application Driver. </p>
  
  <p>As a part of setting up the test environment for testing Windows Calculator app, the following lines are added to the test script :</p>
  
  <pre><code>protected const string WindowsApplicationDriverUrl = “http://127.0.0.1:4723";
  
  DesiredCapabilities appCapabilities = new DesiredCapabilities();
  
  appCapabilities.SetCapability(“app”, “57b3a460–8843–4d84–822a-9f316274c2bf_tz6ph9wdjhqw8!App”);
  
  IOSDriver&lt;IOSElement&gt; AppSession = new IOSDriver&lt;IOSElement&gt;(new Uri(WindowsApplicationDriverUrl), appCapabilities);
  </code></pre>
  
  <p>Looking at the 3rd line, an application identifier is provided to set DesiredCapabilities. My problem is that I have trouble finding or generating a similar app ID for my WPF application. Further down in the tutorial, author mentions:</p>
  
  <p>"In the third line, we set a weird identifier for the “app” device capability. You need to replace this value with yours. It can be found the generated AppX\vs.appxrecipe file under RegisteredUserModeAppID node.</p>
  
  <p><code>&lt;RegisteredUserModeAppID&gt;57b3a460–8843–4d84–822a-9f316274c2bf_tz6ph9wdjhqw8!App&lt;/RegisteredUserModeAppID&gt;</code>"</p>
  
  <p>Can you tell me how this appID can be generated in Visual Studio? Also, is there other ways to set DesiredCapabilities without providing an appID? Can a GUID be used for this purpose?</p>