【发布时间】:2018-08-22 01:55:45
【问题描述】:
我有:ASP.NET Core2 App + Selenium 可以通过浏览器自动执行一些操作。
它在本地完美运行。使用所有 nuget 和 exe 的最新版本。
部署到 Azure 后创建 Webdriver 出现问题。
我试过了:
- 将 .exe 文件包含到文件夹中并像这样使用它:
new ChromeDriver(ChromeDriverService.CreateDefaultService("./CORE/ExeFiles"), chromeOptions);
- 使用独立 RemoteWebServer 运行作业:无法连接到它 + 作业在 Start-Stop 站点后消失。
- 将 .exe 文件作为服务运行 - 死路一条;
- 使用代码从 CMD 运行 .exe 文件:RemoteWebServer on 4444 port OK,但我无法连接到它。
了解一些防火墙或防病毒阻止内容,但找不到在 Azure 上配置必要属性的位置。
如何在 Azure 上使用 Selenium? 一些最简单的例子??,我正在为此奋斗 3 天 =(
附:也可以找到这篇文章https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks 最后是这个:
不受支持: PhantomJS/Selenium:尝试连接本地地址,也使用 GDI+。
替代方案?如何在 Azure 上使用 Selenium?
【问题讨论】:
标签: c# asp.net azure selenium selenium-webdriver