title: Finding WebElements, best practices
body: <p>In our current automation (using Selenium/WebDriver/Java), we use <code>@FindBy</code> <em>very</em> extensively.  For example:</p>
  
  <pre><code>@FindBy(css="a[name='bcrumb']")    protected List&lt;WebElement&gt; breadCrumbLinks;
  @FindBy(id="skuError")         protected WebElement skuError;  
  @FindBy(className="reducedPrice")  protected List&lt;WebElement&gt; reducedPrice;
  @FindBy(partialLinkText="Injinji RUN 2.0")  protected WebElement playButton;
  @FindBy(linkText="annual member refund")    protected WebElement annualMemberRefund;
  @FindBy(xpath="//li[@itemprop='price']")    protected WebElement productPrice;
  </code></pre>
  
  <p>By definition, <code>@FindBy</code> can locate a selector using the following:  using, id, name, className, css, tagName, linkText, partialLinkText and xpath.</p>
  
  <p>Recently, our front-end devs proposed that we implement an new attribute class that begins with 'test='.  I think this is a great idea since we could find WebElements by just looking for that blurb of text, rather than the values that <code>@FindBy</code> inherently uses.  My question is, would it be better to <em>extend the existing functionality</em> of <code>@FindBy</code> OR, create a new way of searching for the WebElements we use in our tests?</p>