Integrate chrome extensions with phantomjs

♀尐吖头ヾ 提交于 2019-12-20 18:43:10

问题


Is there a way we can install chrome extensions (.crx) with phantomjs?

My task here is to integrate adblockplus with phantomjs so that I can filter all the ad-urls and report using phantomjs.

Or any other way to integrate the adblockplus extension with phantomjs?


回答1:


PhantomJS is based on a three-year old WebKit fork (QtWebKit), not Chromium. Therefore you cannot load Chrome extensions in PhantomJS.

If you want to use Chrome extensions in an automated way, I suggest to use the ChromeDriver from the Selenium WebDriver project.



来源:https://stackoverflow.com/questions/23603708/integrate-chrome-extensions-with-phantomjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!