Forum Discussion

hngnango's avatar
hngnango
Occasional Contributor
7 years ago
Solved

error "unexpected end of file after null " into assertion script in Ready API 2.1

Hi I am getting this error "unexpected end of file after null " into assertion script . My script is correct, however I still getting  this error ,so I am wondering what is the root cause of this er...
  • groovyguy's avatar
    7 years ago

    Try changing this line:

    def response = context.expand('${#getBank Request#response}')



    To this line:

    def response = context.expand( '${getBank Request#Response}' )

    The lower-case r on response needs to be capitalized. 

  • groovyguy's avatar
    groovyguy
    7 years ago

    I usually get around this by using a wildcard for the namespace, since in my test-beds the namespaces can fluctuate through environments.

     

    Instead of:

    def actualBankName = holder.getNodeValue("//ns1:bezeichnung/text()")

     

    Try this:

     

    def actualBankName = holder.getNodeValue("//*:bezeichnung/text()")