我使用loadData()
No signature of method: groovy.util.ConfigObject.plus() is applicable for argument
types: (java.lang.String)
values: [/searchpage?s=]
Possible solutions: plus(java.util.Map), plus(java.util.Collection), values(), put(java.lang.Object, java.lang.Object), is(java.lang.Object), use([Ljava.lang.Object;)
守则:
@Test
void canDoSearch() {
driver.manage().window().setSize(new Dimension(1100, 1080));
def url = browser.config.rawConfig.baseUrl + "/searchpage?s=" + terms[rand.nextInt(terms.length)]
go url
$("#productsSortBy").click()
$("form").sortBy='newest'
waitFor{!$(".ajax-loading")}
at SearchResultsPage
}
答案 0 :(得分:2)
看起来browser.config.rawConfig.baseUrl
不是字符串。请尝试拨打toString()
。