相关疑难解决方法(0)

Geb - IncompatibleClassChangeError

我刚刚开始使用Geb,并且在从Book of 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 …
Run Code Online (Sandbox Code Playgroud)

java groovy geb

3
推荐指数
1
解决办法
3564
查看次数

标签 统计

geb ×1

groovy ×1

java ×1