title: Clicking specific part of element using Selenium
body: <p>I'm trying to click on a specific part of an element as the site must use some JS magic to detect where in the element I'm clicking. I can't just click on the row, it has to be on the little black triangle.  </p>
  
  <p><img src="https://i.stack.imgur.com/pAUvp.png" alt="I need to click on the small triangle"></p>
  
  <p>I've tried clicking on the text which is contained in a span:</p>
  
  <p><img src="https://i.stack.imgur.com/jYp2P.png" alt="The text span"></p>
  
  <p>I've also tried clicking on the entire background div that contains the triangle as part of the background:</p>
  
  <p><img src="https://i.stack.imgur.com/KDegM.png" alt="The entire div background"></p>
  
  <p>I've used various combinations of clicking on coordinates and moving the cursor relative to the span like so:</p>
  
  <pre><code>WebElement we = driver.findElement(By.xpath("//span[contains(string(),'Remote PC')]"));
  Actions clickTriangle= new Actions(driver);
  clickTriangle.moveToElement(we).moveByOffset(-10, -5).click().perform();
  </code></pre>
  
  <p>How should I click on this little triangle?</p>
  
  <p><em>Edit</em></p>
  
  <p>More HTML as requested:</p>
  
  <p><img src="https://i.stack.imgur.com/I8MU8.png" alt="More HTML"></p>
  
  <p>Here you can see the triangle is assigned as a background to the div:</p>
  
  <p><img src="https://i.stack.imgur.com/VSX4w.png" alt="Background in CSS"></p>