code: public void clickElementWithAttributeValue(String attributeName, String attributeValue) {
          By xpath = By.xpath("//*[@" + attributeName + "='" + attributeValue + "']");
          WebElement element = seleniumElementService.findExpectedElement(xpath);
          assertTrue("The element you are trying to click (" + xpath.toString() + ") is not displayed", element.isDisplayed());
          element.click();
      }
docs: Find a Element that has a attribute with a certain value and click it
  
  @param attributeName
  @param attributeValue