【问题标题】:Sikuli4Net cannot find server errorSikuli4Net 找不到服务器错误
【发布时间】:2017-08-09 21:32:57
【问题描述】:

我正在尝试使用 Sikuli4Net,但我在 screen.Wait(gmail); 行中遇到了这个异常:

System.Net.WebException: 
Unable to connect to the remote server
InnerException  {"No connection could be made because the 
target machine actively refused it 127.0.0.1:8080"} System.Exception 
{System.Net.Sockets.SocketException}
"No connection could be made because the target machine actively refused it 
127.0.0.1:8080"

这是我的代码:

IWebDriver driver = new ChromeDriver();
driver.Manage().Window.Maximize();
driver.Navigate().GoToUrl("https://www.google.co.nz/");
Thread.Sleep(2000);
Screen screen = new Screen();
Pattern gmail = new 
Pattern(Path.Combine(AppDomain.CurrentDomain.BaseDirectory + 
@"/images/gmail.PNG"));
screen.Wait(gmail);
screen.Click(gmail, true);

我也试过这个代码:

APILauncher launcher = new APILauncher(true);
launcher.Start(); 

我在launcher.Start(); 行再次遇到此异常:

System.ComponentModel.Win32Exception: 
The system cannot find the path specified

我该如何解决这个问题?

【问题讨论】:

    标签: c# selenium sikuli


    【解决方案1】:

    激活管理员并以管理员身份登录。它会解决这个问题

    【讨论】:

    • 这里有同样的问题。我是如何记录管理员的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-11
    • 1970-01-01
    • 2016-07-15
    • 2022-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多