Azure Web 作业异常上的 PhantomJs webdriver 问题 - 无法在 http://localhost:51293/ 上启动驱动程序服务

PhantomJs webdriver issue on Azure web job Exception- Cannot start the driver service on http://localhost:51293/

我正在使用 Phantomjs web 潜水员获取页面源代码。它在本地工作正常,但是当我在 azure 上托管 webjob 时,它给了我异常;

OpenQA.Selenium.WebDriverException: 无法在 http://localhost:51293/

上启动驱动程序服务

http://localhost:51293/ 此路径每 运行 更改一次。

Azure Web App/Web 作业目前不支持 PhantomJS。在以下官方文件的末尾注明。

Azure Web App sandbox - Unsupported frameworks

其他不支持的场景:PhantomJS/Selenium:尝试连接本地地址,也使用GDI+。