title: Selenium Webdriver (Java) - how to check if tag element exists in findelement
body: <p>I'm trying to check whether the element in tag exist or no. For instance I have :</p>
  
  <pre><code>//span[.='System']/following-sibling::span[@style="display: none;"]
  </code></pre>
  
  <p>Not for any tag an element <code>style="display: none;"</code> is exist</p>
  
  <p>So, </p>
  
  <p>I want to put If else handler using Boolean to check if the element exist or no.</p>
  
  <p>I used before:</p>
  
  <pre><code>Boolean elmn = Login.driver.findElements
                          (By.xpath("//span[.='System']/following-sibling::span[@style=\"display: none;\"]")).size() == 0;
  if (elmn)
      exit;
  else 
     Assert.fail()
  </code></pre>
  
  <p>But something not working properly. Is there any suggestions how can I check if the element exist inside tag or not?</p>
  
  <p>Thanks</p>