【问题标题】:Sikuli integration with Selenium Webdriver infoSikuli 与 Selenium Webdriver 信息集成
【发布时间】:2014-06-23 17:33:47
【问题描述】:

我已在构建路径中添加了所有必需的 jar,但是当执行到达 Sikuli API 时出现此错误

[error] ResourceLoaderBasic: checkLibsDir: libs dir is not on system path: C:\Users\general\Desktop\Sikuli\libs
[action] ResourceLoaderBasic: checkLibsDir: Please wait! Trying to add it to user's path
[info] runcmd: reg QUERY HKCU 
[info] runcmd: reg QUERY HKEY_CURRENT_USER\Environment /v PATH 
[error] ResourceLoaderBasic: checkLibsDir: Logout and Login again! (Since libs folder is in user's path, but not activated)
[error] Terminating SikuliX after a fatal error!

对不起,继续没有意义! 如果您对错误原因或解决方案没有任何想法,请再次运行 调试级别为 3。您可以将输出粘贴到问答板上。

这是我的代码

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.sikuli.script.App;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;

public class Sikuli_test3 {

@Test
public void functionName() throws FindFailed {

// Create a new instance of the Firefox driver
WebDriver driver = new FirefoxDriver(); 


// And now use this to visit Google 
driver.get("http://www.google.co.in");

//WebElement element = driver.findElement( By.id("gbqfq"));
//element.sendKeys("Hello");
//element.click();

//Create and initialize an instance of Screen object    
Screen screen = new Screen();

//Add image path   
Pattern image = new Pattern("C:\\sikuli_images\\iam_feeling_lucky.png");

//Wait 10ms for image  
screen.wait(image, 10);

//Click on the image
screen.click(image);
  }
}

【问题讨论】:

    标签: selenium-webdriver sikuli


    【解决方案1】:

    查看用户定义的环境变量%SIKULI_HOME% 是否存在于您的系统中并添加到PATH 环境变量中。如果存在,请重新启动系统。这应该有效。

    http://doc.sikuli.org/faq/030-java-dev.html

    如果这对你有帮助,请告诉我。

    【讨论】:

      猜你喜欢
      • 2013-10-10
      • 1970-01-01
      • 2019-04-03
      • 2011-10-24
      • 1970-01-01
      • 2012-08-19
      • 2015-02-25
      • 2011-04-09
      • 2015-09-12
      相关资源
      最近更新 更多