You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can append the PhantomJS options by modifying this line.
PhantomJS does support remote webdriver for e.g. selenium integration, but thats not going to help you make the browser mimic the behaiviour of your regular browser.
The maintainers of PhantomJS stopped development a few years ago, you are far better off implementing Chrome headless rather than relying on PhantomJS.
How to enable the web driver, I check for availability on this service
https://intoli.com/blog/not-possible-to-block-chrome-headless/chrome-headless-test.html
When using MTS, it shows that it is disabled ...
How can I turn it on?
This my code
require(ROOT.'/vendor/autoload.php'); $browserObj=\MTS\Factories::getDevices()->getLocalHost()->getBrowser('phantomjs'); $browserObj->setKeepalive(true); $browserObj->setDefaultExecutionTime(60000); $windowObj=$browserObj->getNewWindow(); $windowObj->setUserAgent('Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0'); $windowObj->setUrl('https://intoli.com/blog/not-possible-to-block-chrome-headless/chrome-headless-test.html'); $content=$windowObj->getDom(); $browserObj->terminate();
The ultimate goal is to make the request look like a real browser, and not be recognized as headless ...
The text was updated successfully, but these errors were encountered: