0
我是sikuli和硒的新手。當執行以下賽前我得到「FindFailed:鏡像文件空磁盤上找不到」Selenium sikuli ImageFile null沒有在磁盤上找到
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;
public class prac1
{
@Test
public void f() throws Exception
{
System.setProperty("webdriver.chrome.driver", "D://rakesh//software//selenium browser//chrome 2.30//chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("http://www.techved.com/career");
driver.findElement(By.id("aplybtn1")).click();
driver.findElement(By.xpath("//html/body")).sendKeys(Keys.PAGE_DOWN);
Pattern submit_btn = new Pattern(".//ele_screenshot//choose_btn.PNG");
Pattern file_upload = new Pattern(".\\ele_screenshot\\file_upload.PNG");
Pattern open_btn = new Pattern(".\\ele_screenshot\\open_btn.PNG");
Screen screen = new Screen();
screen.setAutoWaitTimeout(3);
screen.click(submit_btn);
screen.type(file_upload, "C:\\Users\\techved\\Desktop\\performance.txt");
screen.click(file_upload);
screen.click(open_btn);
}
它在哪裏出錯?你可以發佈stackstrace嗎? –