title: How to wait until loading window close or visible false
body: <p>I have developed selenium automation framework using JAVA and I facing a problem.
  When I click on any button say Filter or clear filter application display a loading window and after that, we are able to perform next action.
  i have added following code to wait until loading window visible false but its not working. </p>
  
  <pre><code>wait.until(ExpectedConditions.invisibilityOf(webElement));
                      System.out.println("Wait Untill Loading Window Closed");
                      existFlag=true;
  </code></pre>
  
  <p>in web element i passing that loading window XPATH. Every time code not wait for window to be closed start clicking on button and  throw exception</p>
  
  <blockquote>
    <p>unknown error: Element ... is not clickable at point (178, 391). Other element would receive the click: 
  </blockquote>
  
  <p>I also added code for click </p>
  
  <pre><code>wait.until(ExpectedConditions.elementToBeClickable(webElement));
               webElement.click();
               return true;
  </code></pre>
  
  <p>Please help how i can wait till loading window close. </p>
  
  <p><a href="https://i.stack.imgur.com/DxbXZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DxbXZ.jpg" alt="Loading Window"></a></p>