phantom driver doesn't work ,Class 'Driver_Phantomjs' not found in
Closed this issue · 1 comments
amhoho commented
Hi.EZarkov.My system is Win7,PhantomInstaller have installed and have it accessible in PATH. But phantom driver doesn't work.
code:
require 'vendor/autoload.php';
use Openbuildings\Spiderling\Page;
$page = new Page(new Driver_Phantomjs);
$page->visit('https://www.google.com');
$li = $page->find('ul.nav > li.test');
echo $page->text();exit;
$page
->fill_in('Name', 'New Name')
->fill_in('Description', 'some description')
->click_button('Submit');
error:
Fatal error: Class 'Driver_Phantomjs' not found in
halfer commented
You probably need to specify the full namespace for the driver:
use Openbuildings\Spiderling\Driver_Phantomjs;