title: Selenium cropping image using webdriver actions
body: <p>I have a modal box that appears which holds an image that I wish to crop using Selenium.</p>
  
  <p><img src="https://i.stack.imgur.com/8GlEE.png" alt="enter image description here"></p>
  
  <pre><code>&lt;div class="crop" style="width: 380px; height: 204px; position: absolute; top: -2px; left: -2px; z-index: 280; cursor: crosshair;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I tried using Actions from other attempts I've seen:</p>
  
  <pre><code>Actions crop = new Actions(driver);
  crop.dragAndDropBy(cropTracker, 30,220).perform();
  </code></pre>
  
  <p>where cropTracker is the correct xpath for the WebElement ie. crop</p>
  
  <p>What I see on execution is that the modal just blinks momentarily rather than performing the crop drag as shown in the image attached; not sure what I'm doing wrong? </p>