title: Webdriver Expected condition failed: waiting for element to no longer be visiblr
body: <p>I have a method which waits for a css (Modal) locator to not be visible on screen, on some of my builds I get the following failed message</p>
  
  <blockquote>
    <p>Expected condition failed: waiting for element to no longer be
    visible: By.cssSelector: .modal-body (tried for 6 second(s) with 500
    MILLISECONDS interval)
        Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
        System info: host: 'DEV007', ip: '172.16.2.192', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version:
    '1.8.0_131'
        Driver info: org.openqa.selenium.chrome.ChromeDriver
        Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false,
    chrome={chromedriverVersion=2.29.461591
    (62ebf098771772160f391d75e589dc567915b233),
    userDataDir=C:\Users\GI\AppData\Local\Temp\2\scoped_dir7780_13017},
    takesHeapSnapshot=true, pageLoadStrategy=normal,
    databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false,
    version=58.0.3029.110, platform=XP, browserConnectionEnabled=false,
    nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true,
    webStorageEnabled=true, browserName=chrome, takesScreenshot=true,
    javascriptEnabled=true, cssSelectorsEnabled=true,
    unexpectedAlertBehaviour=}]
        Session ID: eb353964f7b9bd515e527a795a111bc3</p>
  </blockquote>
  
  <p>My method:</p>
  
  <pre><code>public boolean waitUntilModalDisapears() {
      return this.wait.until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector(".modal-body")));
  }
  </code></pre>