title: How to optimize this Selenium WebDriver code (Linq?)
body: <p>I'm new to Selenium and C#.</p>
  
  <p>I know this code is not optimal, can you advise how I can write such things quicker and shorter?</p>
  
  <p>Basically I am searching for a button, href of which contains "addNewProduct".</p>
  
  <pre><code>        var addButtons = _driver.FindElements(By.LinkText("Add"));
          IWebElement addNewProductButton = null;
  
          foreach (IWebElement button in addButtons) {
              if (button.GetAttribute("href").Contains("addNewProduct")){
                  addNewProductButton = button;
                  break;
              }
          }
  
          addNewProductButton.Click();
  </code></pre>