我正尝试使用Facebook chrome驱动程序登录网站 然后登录后访问网站的其他路径
登录成功,但是当我尝试查看其他页面时 它不识别我的登录名 这是我的代码:
$process = (new ChromeProcess)->toProcess();
$process->start();
$options = (new ChromeOptions)->addArguments(['--disable-gpu', '--headless','--enable-file-cookies','--disable-web-security','--allow-file-access-from-files']);
$capabilities = DesiredCapabilities::chrome()->setCapability(ChromeOptions::CAPABILITY, $options);
$driver = retry(5, function () use ($capabilities) {
return RemoteWebDriver::create('http://localhost:9515', $capabilities);
}, 50);
$browser = new Browser($driver);
$browser::$baseUrl = 'https://example.com';
$browser->visit('/login')
->type('username','1375344')
->type('password','23444')
->press('.login_btn');
$browser->waitForText('welcome');
$browser->visit('/statement/deposit/view');
$browser->dump();
laravel黄昏和/或facebook驱动程序是否有cookiejar之类的东西?