Integrate chrome extensions with phantomjs

2019-03-18 15:45发布

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条回答
小情绪 Triste *
2楼-- · 2019-03-18 16:16

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.

查看更多
登录 后发表回答