title: How to save an image to desktop using TestComplete?
body: <p>I'm writing tests in JScript in TestComplete. I need to make a screenshot of a web page element, and save it to my desktop as a PNG file.</p>
  
  <p>I tried this code:</p>
  
  <pre><code>var MyPicture = WebPage.SomeLocation.Picture();
  
  MyPicture.SaveToFile("C:\Desktop");
  </code></pre>
  
  <p>which doesn't seem to be working, and I can't seem to figure out why. My program doesn't crash or anything, it simply doesn't save the picture. What am I doing wrong?</p>