Forum Discussion
omatzura
16 years agoSuper Contributor
Hi!
you can do something like the following:
This should get you started..
regards,
/Ole
eviware.com
you can do something like the following:
// get request
def request = testRunner.testCase.getTestStepByName( "Request" ).testRequest
// clear existing attachments
for( a in request.attachments ) {
request.removeAttachment( a )
}
// get file to attach
def file = new File( "file to attach" )
if ( file == null) {
log.info "bad filename"
}
else
{
// attach and set properties
def attachment = request.attachFile( file, true )
attachment.contentType = "application/octet-stream"
attachment.setPart( "Message" )
}
This should get you started..
regards,
/Ole
eviware.com
Related Content
Recent Discussions
- 5 days agoruchisingh