"Fatal error" 在 Sikuli 中,libs 目录不在系统路径上

"Fatal error" in Sikuli, libs dir is not on system path

我第一次在eclipse 中使用sikuli。我将 sikuli 脚本 jar 文件导入到我的项目中,并使用了屏幕和图案 类.

我低于错误

[error] ResourceLoaderBasic: checkLibsDir: libs dir is not on system path: D:\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! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.

为了能够在 Eclipse 中使用 Sikuli,仅导入 Jar 是不够的。如果你想访问 Sikuli API,你可以使用以下依赖项:

<dependencies>
    <dependency>
      <groupId>com.sikulix</groupId>
      <artifactId>sikulixapi</artifactId>
      <version>1.1.0</version>
    </dependency>
  </dependencies>

只需将它与您正在使用的任何 Selenium 版本一起放入您的 maven pom 中即可。