title: How is it possible to automate cropping using selenium?
body: <p>I want to simulate a cropping feature, I know its not possible to simulate human cropping, but the image I will be cropping is 1 size and I want to crop it by setting the cropping WebElement in a fixed size every time I run the test.</p>
  
  <p>to do this I need to know how can I change the cropping style, to set its size...so I can click on the cropping button to get cropping ability (this is simple) and now to set its style so I can get its rectangle.</p>
  
  <p>this is the style prop im talking about:</p>
  
  <p><a href="https://i.stack.imgur.com/Llu8z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Llu8z.png" alt="enter image description here"></a></p>
  
  <p>so I can do something like this:</p>
  
  <pre><code>val cropButton = driver.findElement(By.xpath( """//*[@id="new_company"]/input[4]"""))
      saveButton.click()
  
  driver.executeScript("something to set the style")
  </code></pre>