public function iWaitSecondsForElement($count, $element)
{
$found = false;
$startTime = time();
do {
try {
$node = $this->getSession()->getPage()->findAll('css', $element);
$this->assertCount(1, $node);
$found = true;
} catch (ExpectationException $e) {
/* Intentionnaly leave blank */
}
} while (time() - $startTime < $count);
if ($found === false) {
$message = "The element '{$element}' was not found after a {$count} seconds timeout";
throw new ResponseTextException($message, $this->getSession(), $e);
}
}