title: Difficulty in Framing query for successful login in selenium
body: <p>I am having difficulty in framing the query for composing multiple conditions.</p>
  
  <p>Here is my code</p>
  
  <pre><code>public boolean isuserloggedin()
  {
      boolean flag = false;
  
      if((!driver.findElements(By.id("Cancel")).isEmpty()))!!(driver.findElements(By.xpath("//div[@id='welcomeimagepath']".isDisplayed())))
      {
          flag = true;
      }
  </code></pre>
  
  <p>I want the user to login when both the conditions meet</p>