我正在使用无头浏览器phantomjs如何使用Facebook php-webdriver启用cookie
代码如下:
namespace Facebook\WebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\WebDriverCapabilityType;
require_once('vendor/autoload.php');
$host = 'http://localhost:8001';
$capabilities = array(
WebDriverCapabilityType::BROWSER_NAME => 'phantomjs',
'phantomjs.page.settings.userAgent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/57.0',
'phantom.cookiesEnabled' => true,
);
'phantom.cookiesEnabled'=>是的,不起作用。