我正在尝试使上面具有Silverlight表单的应用程序自动化,因此我正在使用Sikuli api。我在Sikuli中是个新手,对Selenium Web驱动程序的了解很少,但是已经设法进行了研究并找到了Sikuli。现在,我正在尝试将Sikuli与Selenium Webdriver结合使用,并继续提出此错误
System.Net.WebException .The remote server returned an error :(404) Not Found
这里得到的任何帮助都是我的代码
APILauncher launcher = new APILauncher(true);
System.Net.WebClient wc = new WebClient();
WebProxy wp = new WebProxy("proxy"); //--without 80
wc.Proxy.Credentials = new NetworkCredential("user", "pwd", "org");
launcher.Start();
Console.WriteLine("Selenium Sikuli App!");
Pattern image1 = new Pattern("C: \\IMG\\createNew.PNG");
var options = new InternetExplorerOptions
{
IntroduceInstabilityByIgnoringProtectedModeSettings = true
};
/*
* initialize the driver and supply parth to the driver libraries
*/
driver = new InternetExplorerDriver("C:\\Selenium\\", options)
{
/*
* open the supplied URL on the opened instance of the browser
*/
Url = "https:www.google.com"
};
/*
* Maximise the window so all the controls on it would be visible
*/
driver.Manage().Window.Maximize();
/*
* web page open find this element and fill up the input
*/
Screen scr = new Screen();
scr.Wait(image1,15);
scr.Click(image1, true);
我的进口货是
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Support.UI;
using Sikuli4Net.sikuli_JSON;
using Sikuli4Net.sikuli_UTIL;
using Sikuli4Net.sikuli_REST;
using System.Net;
using Newtonsoft.Json;
程序尝试执行此行时出现错误
scr.Wait(image1,15);