title: How to increase the timeout in CasperJS
body: <p>I am using <code>waitFor()</code>. The code as below:</p>
  
  <pre><code>casper.waitFor(function check() {
      return this.evaluate(function() {
          return this.evaluate(someFunction, 'variable 1','variable 2','variable 3') === 'yes';
      });
  }, function then() {
      console.log('Done');
  });
  </code></pre>
  
  <p>Am getting this as console output </p>
  
  <pre><code>Wait timeout of 5000ms expired, exiting.
  </code></pre>
  
  <p>How can I increase the timeout?</p>
  
  <p>EDIT: I have changed the code to </p>
  
  <pre><code> casper.waitFor(function check() {
          return this.evaluate(function() {
              return this.evaluate(someFunction, 'variable 1','variable 2','variable 3') === 'yes';
          });
      }, function then() {
          console.log('Done');
      },10000);
  </code></pre>
  
  <p>It's giving me the following error: </p>
  
  <pre><code>CasperError: Invalid timeout function, exiting.
      C:/filename:1720 in _check
  </code></pre>