小编use*_*299的帖子

在 Azure 云服务上运行 Selenium Chrome WebDriver?

我有:ASP.NET Core2 App + Selenium来使用浏览器自动执行一些操作。

它在本地运行完美。使用所有 nuget 和 exe 的最新版本。

部署到 Azure 后,创建 Webdriver 时出现问题。

我试过:

  • 将 .exe 文件包含到文件夹中并使用它,如下所示:

新的 ChromeDriver(ChromeDriverService.CreateDefaultService("./CORE/ExeFiles"), chromeOptions);

  • 使用独立的 RemoteWebServer 运行作业:无法连接到它 + 作业在启动-停止站点后消失。
  • 将 .exe 文件作为服务运行 - 死胡同;
  • 从 CMD 运行 .exe 文件,代码为: RemoteWebServer on 4444 port OK,但我无法连接到它。

了解一些防火墙或防病毒阻止内容,但找不到在 Azure 上配置必要属性的位置。

如何在 Azure 上使用 Selenium? 一些最简单的例子请??,我为此奋斗了3天=(

PS 还可以找到这篇文章https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks ,最后是这样的:

不支持: PhantomJS/Selenium:尝试连接到本地地址,并且还使用 GDI+。

备择方案?如何在 Azure 上使用 Selenium?

c# asp.net selenium azure selenium-webdriver

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

asp.net ×1

azure ×1

c# ×1

selenium ×1

selenium-webdriver ×1