Answer the question
In order to leave comments, you need to log in
Where can I get the PhantomJS cookie setting feature?
Yesterday I asked how to set cookies in PhantomJS MTS PHP, I was given the link https://github.com/merlinthemagic/MTS/blob/master/... , there is a function $windowObj->setCookie(...) , I have PhantomJS MTS (merlinthemagic) is installed, everything is installed according to the instructions, I checked everything works, that is
$browserObj=\MTS\Factories::getDevices()->getLocalHost()->getBrowser('phantomjs');
$browserObj->setKeepalive(true);
$windowObj=$browserObj->getNewWindow();
$windowObj->setUserAgent($user_agent);
$windowObj->setUrl('.............');
$content=$windowObj->getDom();
$cookies=$windowObj->getCookies();
echo $content;
$browserObj->terminate();
Fatal error: Uncaught Error: Call to undefined method MTS\Common\Devices\Browsers\Window::setCookie() in
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question