title: Does Selenium WebElement.Click() wait until the next page is loaded?
body: <p>I tell Selenium to wait until it sees an element - Selenium sees it
  I tell Selenium to click on this element, it is a button to link to a new page - Selenium click on it.</p>
  
  <p>The problem is that after clicking it, Selenium will then wait until the next page is fully loaded (the page sometimes loads in a second, or waits for ages, I think it's a problem with Zen Desk Live Chat on that page). </p>
  
  <p>When it is fully loaded it will then throw an error and say that the element it clicked on cannot be seen (naturally it can't because it is now on a new page)</p>
  
  <p>I have tried changing the wait time with </p>
  
  <pre><code>driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
  </code></pre>
  
  <p>however this doesn't help.
  I have also tried</p>
  
  <pre><code>wait.until(ExpectedConditions.visibilityOfElementLocated(
  By.xpath(element)));
  </code></pre>
  
  <p>However this has the same problem.</p>
  
  <p>Below is the code I am currently using.</p>
  
  <pre><code>try {
      wait.until(ExpectedConditions.visibilityOfElementLocated(
      By.xpath(element)));
      WebElement we = driver.findElement(By.xpath(element));
      we.click();
      System.out.println("Clicked: " + element);
  }catch (Exception e){
      System.out.println(e.getMessage()); 
  }   
  </code></pre>
  
  <p>I expect that once the element has been clicked on, that Selenium just carries on without caring if the next page has loaded up or not.</p>
  
  <p>However what happens is when the 2nd page loads up, sometimes the page gets stuck "waiting for widget-mediator.zopim.com" and Selenium will not progress past the click() line until the the WebDriverWait time has expired (60 seconds)
  After the 60 seconds has expired I see this error in the Console Output:</p>
  
  <pre><code>[1561374309.111][SEVERE]: Timed out receiving message from renderer: 60.000
  [1561374309.112][SEVERE]: Timed out receiving message from renderer: -0.002
  </code></pre>
  
  <p>Is something else happening here? Or does Click() wait until the page has loaded, if that click takes it to a new page? If it does is there a way to tell it to stop waiting? I have other code to check if the page has loaded or not, but I don't need Click() to do this.</p>
  
  <p>Thanks in advance.</p>