Forum Discussion

crl6904's avatar
crl6904
New Contributor
8 years ago

SOAP UI - HTTP request parse and download pdf attachment

Hi all,

 

I am new to this group and just started using SOAP UI.

 

I have made a test case where a user goes through a certain amount of steps and towards the end, the user must make a http request.

 

When the SOAP UI makes the request, the answer that is given is HTML/Javascript that should open a new window with a link to a pdf document.

 

Since the attachment cannot be downloaded from that screen I was thinking about taking that request and parse the Javascript (Groovy?) for the URL to the document and then open a new http request.

 

Has anyone tried this before? Are there any examples that I could look at?

 

Is there maybe a simpler solution?


thanks and kind regards

 

2 Replies

    • crl6904's avatar
      crl6904
      New Contributor

      Hi

      thanks for the snippet.

      I tried but get an error on line 1 :"groovy.lang.MissingPropertyException: No Such property: messageExchange for class: Script1 error at line:1"

      so maybe I placed it in the wrong place - which is the first step right after the HTTP request.

      I used the updated script

      Also was not sure but I added the line :
      def testStep = testRunner.testCase.getTestStepByName( "request.." )

      changing "request" to HTTP request and it did not work

      Any help would be appreciated

      thanks