Is it possible to use navigators in Spock's where block?  What I am trying 
to accomplish is to use one Unroll method to perform a test but the only 
thing that will change on the tests is the input field.  Whenever I try to 
run the test I get a NullPointerException.  Something like this. 


@Unroll
> def "#field character limit"(){
>     given:
>     page = at ApplicantInformationPage
>
>     when:
>     input << text
>
>     then:
>     input.size() == limit
>
>     where:
>     field          |     text           |  limit  |  input
>     "first name"   |   exceeds256limit  |   256   |  page.firstNameField
>     "phone"        |   exceeds10limit   |   10    |  page.phoneNumberField
>     "zip"          |   exceeds5limit    |   5     |  page.zipcodeField
>
>
Error I am getting:

> java.lang.NullPointerException: Cannot get property 'firstNameField' on 
> null object


> at geb.tests.ApplicantInformationPageTest.#field character 
> limit(ApplicantInformationPageTest.groovy)

 


Can anyone enlighten me as to what I may be doing wrong? 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/6c920f62-1b7b-4fe3-99e0-38099f5294cd%40googlegroups.com.

Reply via email to