/** * @expectedException \InvalidArgumentException */ public function testWaitForFailure() { $node = new NodeElement('some xpath', $this->session); $node->waitFor(5, 'not a callable'); }
/** * Waits for an element(-s) to appear and returns it. * * @param integer $timeout Maximal allowed waiting time in seconds. * @param callable $callback Callback, which result is both used as waiting condition and returned. * Will receive reference to `this element` as first argument. * * @return mixed */ public function waitFor($timeout, $callback) { return $this->_wrappedElement->waitFor($timeout, $callback); }