class ParameterizedCartRow extends Module {
def nameIndex
def quantityIndex
def priceIndex
static content = {
cell { $("td", it) }
productName { cell(nameIndex).text() }
quantity { cell(quantityIndex).text().toInteger() }
price { cell(priceIndex).text().toBigDecimal() }
}
}
class CheckoutPageWithParametrizedCart extends Page {
static content = {
cartItems {
$("table tr").tail().moduleList {
new ParameterizedCartRow(nameIndex: it, quantityIndex:
it+1, priceIndex: it+2)
}
}
}
}
Can i call this as
cartItems[0].
productName.displayed
When i tried to call the parameterized moduleList
I got an error stating :
Condition not satisfied:
null+1
--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+u...@googlegroups.com.
To post to this group, send email to geb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-dev/0c41a5d9-8ced-4a1e-a30d-4d711d5dfd0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.