Example #1
0
 public function testWaitForSelector()
 {
     $casper = new Casper();
     $casper->start('http://www.google.com');
     $casper->fillForm('form[action="/search"]', array('q' => 'search'), true);
     $casper->waitForSelector('.gbqfb', 2000);
     $casper->click('h3.r a');
     $casper->run();
     $this->assertNotEmpty($casper->getRequestedUrls());
     $this->assertContains('http://www.google.com/', $casper->getRequestedUrls());
 }