Geb - IncompatibleClassChangeError - PullRequest
       11

Geb - IncompatibleClassChangeError

3 голосов
/ 19 октября 2011

Я только начинаю с Geb и сталкиваюсь с этой ошибкой при вводе примера кода из Книги Geb:

import geb.Browser


Browser.drive {
    go "http://google.com/ncr"

    // make sure we actually got to the page
    assert title == "Google"

    // enter wikipedia into the search field
    $("input", name: "q").value("wikipedia")

    // wait for the change to results page to happen
    // (google updates the page dynamically without a new request)
    waitFor { title.endsWith("Google Search") }

    // is the first link to wikipedia?
    def firstLink = $("li.g", 0).find("a.l")
    assert firstLink.text() == "Wikipedia"

    // click the link
    firstLink.click()

    // wait for Google's javascript to redirect to Wikipedia
    waitFor { title == "Wikipedia" }
}

Я сталкиваюсь с этим исключением:

Caught: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 4 but got 5
    at geb.error.GebException.<init>(GebException.groovy:20)
    at geb.waiting.WaitTimeoutException.<init>(WaitTimeoutException.groovy:30)
    at geb.waiting.Wait.waitFor(Wait.groovy:108)
        .......

Есть идеи?Спасибо!

Ответы [ 2 ]

12 голосов
/ 20 октября 2011

Вы случайно используете Java 7?Groovy-код, использующий исключения, скомпилированные с

1 голос
/ 12 февраля 2013

Geb совместим с Java7 по состоянию на 0.7.1.Если вы ниже, вы должны обновить.СМ .: http://jira.codehaus.org/browse/GEB-194

...