C# Ranorex无法启动Chrome浏览器,没有警告或错误 Ranorex 7.0.1,评估版,剩余28天 操作系统,视窗10 Chrome驱动程序,2.29 Selenium webdriver独立服务器,3.4.0
我已将端点设置为本地Selenium WebDriver,其连接已测试为“已连接” WebDriver,WebDriver。已将支持添加到引用中 代码片段如下所示:C# Ranorex无法启动Chrome浏览器,没有警告或错误 Ranorex 7.0.1,评估版,剩余28天 操作系统,视窗10 Chrome驱动程序,2.29 Selenium webdriver独立服务器,3.4.0,c#,selenium,ranorex,C#,Selenium,Ranorex,我已将端点设置为本地Selenium WebDriver,其连接已测试为“已连接” WebDriver,WebDriver。已将支持添加到引用中 代码片段如下所示: namespace HoT { class Program { [STAThread] public static int Main(string[] args) { // Uncomment the following 2 lines if y
namespace HoT
{
class Program
{
[STAThread]
public static int Main(string[] args)
{
// Uncomment the following 2 lines if you want to automate Windows apps
// by starting the test executable directly
//if (Util.IsRestartRequiredForWinAppAccess)
// return Util.RestartWithUiAccess();
Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
int error = 0;
var webDriver = new ChromeDriver(@"C:\Users\myName\Documents\Ranorex\RanorexStudio Projects\HoT\HoT\ExternalModules\chromedriver");
webDriver.Navigate().GoToUrl("http://www.google.com");
try
{
error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);
}
catch (Exception e)
{
Report.Error("Unexpected exception occurred: " + e.ToString());
error = -1;
}
return error;
}
}
}
我得到的只是一个控制台窗口和一个弹出窗口,没有Chrome浏览器实例或警告或错误。有人知道为什么吗
您需要使用启动浏览器
Host.Current.OpenBrowser("http://www.google.com", "Chrome", "", false, false, false, false, false);