Geb (및 Groovy)가 Java 백그라운드에서 들어오는 것을 배우고 있으며 Geb의 작동 방식을 이해하고 있지만 가장 간단한 구성 작업을 수행하는 데 실패했습니다.
기본적으로, 나는 다음과 같은 오류를 받고 있어요 :GeCl Groovy 간단한 설정, NoClassDefFoundError 받기
Caught: java.lang.NoClassDefFoundError: geb/error/GebException
java.lang.NoClassDefFoundError: geb/error/GebException
at DriveIt.run(DriveIt.groovy:15)
Caused by: java.lang.ClassNotFoundException: geb.error.GebException
... 1 more
내 클래스는 매우 간단합니다 :
import groovy.grape.Grape
// I have these out of desperation
Grape.grab(group:"org.gebish", module:"geb-core", version:"0.9.3")
Grape.grab(group:"org.seleniumhq.selenium", module:"selenium-firefox-driver", version:"2.41.0")
Grape.grab(group:"org.seleniumhq.selenium", module:"selenium-support", version:"2.41.0")
// basic imports here
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.*;
import geb.Browser;
Browser.drive {
go "http://www.google.com"
}
을 내가 "Browser.drive"줄에 오류가이 간단한 코드와 함께.
이 내 GebConfig.groovy 파일과 같은 모습입니다 :
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.firefox.FirefoxDriver
driver = {
def driver = new ChromeDriver()
driver
}
baseUrl = 'http://localhost:8080/'
reportsDir = 'target/geb-reports'
그리고 한 번 더 참고, 나는 이클립스를 사용하고, 나는 GEB 코드 항아리가 제대로뿐만 아니라 클래스 경로에 가져가 않습니다.
나는 잘못하고있는 것처럼 보이지 않지만, 내 인생에서 "브라우저"가 인식되지 않는다는 오류가 나오는 이유를 알 수 없습니다.
어떤 도움말 ??? 부디!!
답변 해 주셔서 감사합니다. 나는 집에 가서 이것을 시험해 보겠다. 포도를 가져오고 사용하는 것만으로 충분하지 않다는 말입니까? – xubean
안녕하세요, 다시는 아무 것도하지 않았습니다. '포도'명령이 무엇인지는 확실하지 않습니다. 나는 터미널을 통해 geb-core를 설치하는 다른 방법이 없다고 생각합니다. btw, 나는 유닉스 환경 (맥 OS)입니다. – xubean
브라우저 클래스를 찾을 수 없습니다. '% user %/groovy \ grapes \ org.gebish \ geb-core \ jars' 디렉토리에 geb-core-0.9.3이 있는지 확인 했습니까? – olyv