找不到类型或名称空间名称“ OpenQA”

时间:2019-01-27 09:58:18

标签: c# selenium selenium-chromedriver

我正在尝试在Ubuntu中使用C#设置Selenium chromedriver。我正在将chromedriver下载到当前文件夹中。当我尝试运行我的简单代码时,我选择了一个错误。 注意:我是C#的初学者 我正在使用Ubuntu 18.04 OS

using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace SeleniumTest
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            ChromeDriverService service = ChromeDriverService.CreateDefaultService("/home/nariko/Desktop/Csharp/printHello/", "chromedriver"); //This iss my path to chromedriver
            IWebDriver driver = new ChromeDriver(service);
            driver.Navigate ().GoToUrl ("http://www.google.com");
        }
    }
}

I have selected errors, when I trying to run this code.

test.cs(3,7): error CS0246: The type or namespace name `OpenQA' could not be found. Are you missing an assembly reference?
test.cs(4,7): error CS0246: The type or namespace name `OpenQA' could not be found. Are you missing an assembly reference?

0 个答案:

没有答案