Forum Discussion
depeche
17 years agoContributor
Hi,
I found the solution for the above stated problem. We can do it in groovy script by using the following piece of code
To set the ContentID in Attachments using groovy script:
def newContentid = "${java.util.UUID.randomUUID()}";
testRunner.testCase.testSteps['Your Request Name'].httpRequest.getAttachmentAt(0).setContentID(newContentid);
To get the ContentId in Attachments, use following piece of code:
def contentId = testRunner.testCase.testSteps['Your Request Name'].httpRequest.getAttachmentAt(0).getContentID();
regards ~ depeche
I found the solution for the above stated problem. We can do it in groovy script by using the following piece of code
To set the ContentID in Attachments using groovy script:
def newContentid = "${java.util.UUID.randomUUID()}";
testRunner.testCase.testSteps['Your Request Name'].httpRequest.getAttachmentAt(0).setContentID(newContentid);
To get the ContentId in Attachments, use following piece of code:
def contentId = testRunner.testCase.testSteps['Your Request Name'].httpRequest.getAttachmentAt(0).getContentID();
regards ~ depeche