1

以下は私のGebページ、仕様、エラーです。どこで何が問題なのかわかりません。以下を削除してApplicationSummaryPageも、このエラーは発生しません。

ds(待機:true)
{モジュールDatasourceInformationRow、$( "table.ic-table-creditReportProduct table tr"、it)}
class ApplicationSummaryPage extends Page
{
    static url = "application-summary/application-summary.jsf"

    static at =
    { assert title == "Application Summary" }

    static content =
    {
        menu
        { module MenuModule }

        userPanel
        {module UserPanelModule }

        ds(wait: true)
        { module DatasourceInformationRow, $("table.ic-table-creditReportProduct table tr", it) }

        applicationSummaryForm
        { $("#applicationSummary_form") }

        workItemDiv
        {$("div", id: "consumerWorkItems:workItemPanel")}

        workItemsSection
        {workItemDiv.find (".ui-panel-title").text()}

        resubmitLink
        {$("a",id: "loginForm")}

        overrideDecisionLink
        {$("a",id: "loginForm")}

        addNoteLink
        {$("a",id: "loginForm")}
    }
}

スペック

class SearchSpec extends BaseUiSpec {def setup(){login( "manager")}

def "cccc"()
{
    when: "I search"
    to SearchPage
    at SearchPage

    applicationid.value "10002000000010000"
    searchButton.click()
    at SearchPage

    waitFor
    { searchResultsData }

    println "------------"+ searchResults(0).ApplicationId.text()

    searchResults(0).ApplicationId.click(ApplicationSummaryPage)
    Thread.sleep 5000
    at ApplicationSummaryPage
    println "-----???"+ ds
}

}

エラー

geb.waiting.WaitTimeoutException: condition did not pass in 15.0 seconds (failed with exception)
    at geb.waiting.Wait.waitFor(Wait.groovy:126)
    at geb.content.PageContentTemplate.create(PageContentTemplate.groovy:117)
    at geb.content.PageContentTemplate.get(PageContentTemplate.groovy:98)
    at geb.content.NavigableSupport.getContent(NavigableSupport.groovy:43)
    at geb.content.NavigableSupport.propertyMissing(NavigableSupport.groovy:127)
    at geb.Browser.propertyMissing(Browser.groovy:175)
    at geb.spock.GebSpec.propertyMissing(GebSpec.groovy:55)
    at test.SearchSpec.cccc(SearchSpec.groovy:33)
Caused by: geb.error.InvalidPageContent: Definition of page component template '$' of 'ApplicationSummaryPage' is invalid, params must be either a Closure, or Map and Closure (args were: [class java.lang.String, null])
    at geb.content.PageContentTemplateBuilder.throwBadInvocationError(PageContentTemplateBuilder.groovy:69)
    at geb.content.PageContentTemplateBuilder.methodMissing(PageContentTemplateBuilder.groovy:51)
    at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
    at com.equifax.ic.testing.framework.ui.pages.applicationmanagement.ApplicationSummaryPage._clinit__closure2_closure5(ApplicationSummaryPage.groovy:24)
    at com.equifax.ic.testing.framework.ui.pages.applicationmanagement.ApplicationSummaryPage._clinit__closure2_closure5(ApplicationSummaryPage.groovy)
    at geb.content.PageContentTemplate.invokeFactory(PageContentTemplate.groovy:134)
    at geb.content.PageContentTemplate.create_closure1(PageContentTemplate.groovy:103)
    at geb.content.PageContentTemplate.create_closure1(PageContentTemplate.groovy)
    at geb.waiting.Wait.waitFor(Wait.groovy:115)
    ... 7 more
4

1 に答える 1

0

問題は、 dsのインデックスを渡さないことでした。修正されたバージョンは以下のとおりです

println "-----???"+ ds(0)

Gebメーリングリストで回答を得ました。他の人のためにここに投稿します。

于 2012-04-13T18:57:29.967 に答える