Sets how long to wait before deciding an element does not exists.
@param implicitWait time in milliseconds to wait.
439984
public void setImplicitlyWait(int implicitWait) {
        try {
            driver().manage().timeouts().implicitlyWait(implicitWait, TimeUnit.MILLISECONDS);
        } catch (Exception e) {
            // https://code.google.com/p/selenium/issues/detail?id=6015
            System.err.println("Unable to set implicit timeout (known issue for Safari): " + e.getMessage());
        }
    }
1166177
def wait_for_element_absent(self, selector, by=By.CSS_SELECTOR,
                                timeout=settings.LARGE_TIMEOUT):
        
        if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
            timeout = self.__get_new_timeout(timeout)
        if page_utils.is_xpath_selector(selector):
            by = By.XPATH
        return page_actions.wait_for_element_absent(
            self.driver, selector, by, timeout)
8197
def set_wait(timeout = nil)
      timeout = @core.default_wait if timeout.nil?
      @driver.manage.timeouts.implicit_wait = timeout
    end
459145
def wait_for(element)
      case element
        when :page_load
          browser.wait_for(:wait_for => :page)
        when :ajax
          browser.wait_for(:wait_for => :ajax, :javascript_framework => Pyrite.js_framework)
        else
          browser.wait_for(:element => "jquery=#{element}")
      end
    end
1164076
public void waitUntilComplete(long timeout) {
        long base=System.currentTimeMillis();
        long now=0;
        lock.lock();
        try {
            while(processing || count.get() > 0) {
                long delay=timeout-now;
                if(delay <= 0)
                    break;
                try {
                    processing_done.await(delay, TimeUnit.MILLISECONDS);
                    now=System.currentTimeMillis()-base;
                }
                catch(InterruptedException e) {
                }
            }
        }
        finally {
            lock.unlock();
        }
    }
596298
void waitForReady() {
    if (!ready) {
      writeLock();
      try {
        while (!ready) {
          try {
            cond.await(5000, TimeUnit.MILLISECONDS);
          } catch (InterruptedException ie) {
          }
        }
      } finally {
        writeUnlock();
      }
    }
  }
471515
protected int getWaitPeriodInSeconds() throws ActivityException {
        String unit = super.getAttributeValue(WAIT_UNIT);
        int factor;
        if (MINUTES.equals(unit)) factor = 60;
        else if (HOURS.equals(unit)) factor = 3600;
        else if (DAYS.equals(unit)) factor = 86400;
        else factor = 1;  // Means specified value is already in seconds
        int retTime;
        String timeAttr;
        try {
            timeAttr = super.getAttributeValueSmart(WorkAttributeConstant.TIMER_WAIT);
        } catch (PropertyException e) {
            throw new ActivityException(-1, "failed to evaluate time expression", e);
        }
        retTime = StringHelper.getInteger(timeAttr, DEFAULT_WAIT);
        return retTime*factor;
    }
986014
public void waitFor(Flag flag,
                        int waitDelay)
        throws ServerException,
               IOException,
               InterruptedException {
        waitFor(flag, waitDelay, WAIT_FOREVER);
    }
855883
void doAwaitUntil() throws InterruptedException {
        lock.lock();
        try {
            condition.await(DEFAULT_TIMEOUT_MILLISECONDS, TimeUnit.MILLISECONDS);
        } finally {
            lock.unlock();
        }
    }
1207671
public WebElement waitForElement(By by) {
        int attempts = 0;
        int size = driver.findElements(by).size();

        while (size == 0) {
            size = driver.findElements(by).size();
            if (attempts == MAX_ATTEMPTS) fail(String.format("Could not find %s after %d seconds",
                                                             by.toString(),
                                                             MAX_ATTEMPTS));
            attempts++;
            try {
                Thread.sleep(1000); // sleep for 1 second.
            } catch (Exception x) {
                fail("Failed due to an exception during Thread.sleep!");
                x.printStackTrace();
            }
        }

        if (size > 1) System.err.println("WARN: There are more than 1 " + by.toString() + " 's!");

        return driver.findElement(by);
    }
1210681
@Override
    public void _waitForNonStaleResults(Duration waitTimeout) {
        theWaitForNonStaleResults = true;
        timeout = ObjectUtils.firstNonNull(waitTimeout, getDefaultTimeout());
    }
248137
def is_present_no_wait(self, locator):
        

        # first attempt to locate the element

        def execute():
            '''
            Generic function to execute wait
            '''
            return True if len(self.locator_handler.find_by_locator(self.driver, locator, True)) < 0 else False

        return self.execute_and_handle_webdriver_exceptions(
            execute, timeout=0, locator=locator, failure_message='Error running webdriver.find_all.')
1166689
@Override
	public void waitForEnabled(long time) throws WidgetException {
		waitForCommand(new ITimerCallback() {

			@Override
			public boolean execute() throws WidgetException {
				return isEnabled();
			}

			@Override
			public String toString() {
				return "Waiting for element with the locator: " + locator + " to be enabled.";
			}
		}, time);

	}
735842
function(element, callback, nowait) {
    var self = this;
    if (!nowait) {
      this.waitForPage(function() {
        self.waitForElement(element, callback, true);
      });
    }
    else {
      var loadWait = function() {
        setTimeout(function() {
          self.waitForElement(element, callback, true);
        }, 100);
      };
      if (nowait) {
        getPage(function(page) {
          page.evaluate(function(element) {
            var element = jQuery(element);
            return ((element.length > 0) && element.is(':visible'));
          }, function(found) {
            if (found) {
              self.debug('Element ' + element + ' found');
              callback.call(self);
            }
            else {
              loadWait();
            }
          }, element);
        });
      }
      else {
        loadWait();
      }
    }
  }
1273390
public static void waitUntilElementIsInvisible(final String elementLocator) {
        logger.entering(elementLocator);
        By by = HtmlElementUtils.resolveByType(elementLocator);
        ExpectedCondition<Boolean> condition = ExpectedConditions.invisibilityOfElementLocated(by);
        waitForCondition(condition);
        logger.exiting();
    }
403515
private static void tryWaitingForGC() {
    // We could try to preallocate memory mx bean and count collections...
    // there is no guarantee it doesn't allocate stuff too though.
    final long timeout = System.currentTimeMillis() + 2000;
    while (System.currentTimeMillis() < timeout) {
      System.gc(); 
      try {
        Thread.sleep(250);
      } catch (InterruptedException e) {
        break;
      }
    }
  }
713664
def assert_element_absent(self, selector, by=By.CSS_SELECTOR,
                              timeout=settings.SMALL_TIMEOUT):
        
        if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
            timeout = self.__get_new_timeout(timeout)
        self.wait_for_element_absent(selector, by=by, timeout=timeout)
        return True