Good find, Jeremy. :)

On Tue, Jul 30, 2019 at 9:50 PM jc <[email protected]> wrote:

> Looks like erdi already answered this on StackOverflow which was exactly
> what I was looking for:
> https://stackoverflow.com/questions/46960922/using-spock-data-tables-to-test-geb-page-objects
>
> On Tuesday, July 30, 2019 at 3:28:35 PM UTC-5, jc wrote:
>>
>> 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/ae7a2177-f085-4340-ae93-611b2e3ac967%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/ae7a2177-f085-4340-ae93-611b2e3ac967%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2B52dQSB1Qwy9KV9mmh3BEO3KduKtJpSjE0La4qVKUhJ9G20HA%40mail.gmail.com.

Reply via email to