本文介绍了在C#中运行HtmlUnit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用C#中的Selenium WebDriver运行HtmlUnit.

I'm trying to run HtmlUnit using Selenium WebDriver in C#.

当我运行以下代码(据我所知,应启动HtmlUnit网络驱动程序):

When I run the following code (which as I understand it should start the HtmlUnit webdriver):

var caps = DesiredCapabilities.HtmlUnit();
IWebDriver driver = new RemoteWebDriver(caps);

我得到了例外:

就我而言,我需要运行HtmlUnit服务器.如果有人可以帮助我,那么我一定会非常感激!!!

As far as I'm concerned I need to have the HtmlUnit server running.If anyone could help me out then I'd greatly appreciate it for sure!!!!

推荐答案

您的命令尝试连接到Selenium节点,但不会启动它.

Your command tries to connect to a Selenium node and doesn't start it.

这篇关于在C#中运行HtmlUnit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 21:17
查看更多