title: Boolean variable in Webdriver
body: <p>I have definition of <code>Boolean</code> variable in Webdriver backed as:</p>
  
  <pre><code>boolean r1 = selenium.isTextPresent("something");
  </code></pre>
  
  <p>I used this in <code>while</code> loop. I want convert my code to Webdriver code and I tried:</p>
  
  <pre><code>boolean jr1 = driver.findElement(By.linkText("something")) != null;
  </code></pre>
  
  <p>But it works only when text is present and value is <code>true</code>. When value should be returned as <code>false</code> to my variable i receive in console error:</p>
  
  <pre><code>Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Unable to locate element: {"method":"link text","selector":"something"}
  </code></pre>
  
  <p>Can you give me any suggestions how i can do that?</p>