gpt4 book ai didi

selenium - 如何将Sikuli集成到项目中来运行build.gradle?

转载 作者:行者123 更新时间:2023-12-03 06:24:00 24 4
gpt4 key购买 nike

我在项目中使用Sikuli处理一些Flash按钮。在本地运行脚本时,它工作正常。问题是,当我需要运行build.gradle时,我需要在build.gradle中具有Sikuli依赖项。这就是我编写build.gradle的方式。运行构建时,出现此错误:

  • What went wrong: Could not resolve all dependencies for configuration ':compile'.

    Could not find com.googlecode.javacpp:javacpp:0.1. Required by: :new_qa_automation:1.0 > org.sikuli:sikuli-api:1.0.2 > org.sikuli:sikuli-c ore:1.0.1 Could not find com.googlecode.javacv:javacv:0.1. Required by: :new_qa_automation:1.0 > org.sikuli:sikuli-api:1.0.2 > org.sikuli:sikuli-c ore:1.0.1

  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。


  • 建立失败。

    这是我的build.gradle文件

    apply plugin: 'java' version = '1.0' apply plugin: 'project-report'

    repositories { mavenCentral() maven { url "http://repo.springsource.org/release" url "http://oss.sonatype.org/content/groups/public/" } }

    sourceCompatibility = 1.6 targetCompatibility = 1.6

    configurations { cucumberRuntime { extendsFrom testRuntime } }

    task test(overwrite: true) { dependsOn assemble, processTestResources, compileTestJava doLast { javaexec { main = "cucumber.api.cli.Main" classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
    //some args

            systemProperties System.properties
    }
    } }

    dependencies { compile 'org.seleniumhq.selenium:selenium-java:2.32.+' compile 'org.apache.commons:commons-lang3:3.1' compile 'org.springframework:spring-context:3.2.3.RELEASE' compile group: 'org.sikuli', name: 'sikuli-api', version: '1.0.+' compile group: 'commons-collections', name: 'commons-collections', version: '3.+' testCompile 'info.cukes:cucumber-java:1.1.2' testCompile 'info.cukes:cucumber-spring:1.1.2'
    testCompile 'info.cukes:cucumber-junit:1.1.2'
    testCompile 'junit:junit:4.11' testCompile 'org.easytesting:fest-assert-core:2.0+' }



    编辑:

    我添加了Maven存储库的URL。现在错误已更改为

    ePage.java:9: error: package org.sikuli.script does not exist import org.sikuli.script.FindFailed;

最佳答案

Sikuli IDE项目中的sikuli-script.jar未在任何存储库中提供,因此您必须像第3方jar一样使用它

看到:
“Mavan的中央存储库将不回答任何Sikuli的东西” https://answers.launchpad.net/sikuli/+question/185713

“Gradle:使第3方jar可供本地gradle存储库使用” Gradle: Make a 3rd party jar available to local gradle repository

关于selenium - 如何将Sikuli集成到项目中来运行build.gradle?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18329453/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com