Contributions
Re: Trying to download attachment in response
Yes , It did work , but now the problem is , it always write it in to same filename. The issue is the document which get in response has different name and filetype. So don't know how to make it dynamic.4 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes2CommentsRe: Trying to download attachment in response
While trying to put groovy script "def testStep = testRunner.testCase.getTestStepByName( "Request_1" ) def response = testStep.testRequest.response def outFile = new java.io.FileOutputStream( "C:\\Users\\Documents\\myfile.jpg") def ins = response.attachments[0].inputStream com.eviware.soapui.support.Tools.writeAll( outFile, ins ) ins.close() outFile.close() step I am getting below error java.lang.ArraylndexOutOfBoundsException: 0 error at line: 5 One more thing i want to mention my response itself is a document, and not an attachment. So basically i want to download response. below is my response.4 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes4Comments- 4 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.9KViews0likes6Comments