Z
Z
Zimaell2019-08-08 12:55:03
PHP
Zimaell, 2019-08-08 12:55:03

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();

but when I applied the $windowObj->setCookie(...) function, I got
Fatal error: Uncaught Error: Call to undefined method MTS\Common\Devices\Browsers\Window::setCookie() in

that is, there is no such function, I also rustled through the files and it was not there ...
Where can I get it and where to install it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2019-08-08
@Zimaell

the old version is installed, install the new one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question