--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@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-user/ee85325a-8e23-4aed-8270-9cfb69e134ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Content defintions are method calls and not map entries. You should use the following:static def ids = ['header', 'title', 'element1', 'etc']static content = {ids.each { id ->"$id"({ $(id: id) })}}
On Fri, Oct 13, 2017 at 5:32 PM, Adam Gilbert <michael.ad...@gmail.com> wrote:
Hello,All the web elements I'm going to access have ID's, so I was hoping to define the content using just a list of expected ID's.for example:
static def ids = ['header', 'title', 'element1', 'etc']static content = {ids.each {[it: {$(By.id(it))}]}}However, it is unable to resolve any of them "as content or as a property on its navigator context".How should I be defining content through a list?Thanks,Adam
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/2b661852-cf71-4836-b607-caa3d289d609%40googlegroups.com.
def fillForm() {
ids.each { /* it */ << 'foo' }
}To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@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-user/ac0151d3-dce6-4da7-8dda-9ee7c3adf403%40googlegroups.com.