cancel
Showing results for 
Search instead for 
Did you mean: 

updating Body of Email with groovy Script

Highlighted
Occasional Contributor

updating Body of Email with groovy Script

 I am wanting to run a Groovy Script that updates the body of an email after each test suite is completed 

before sending the Email 

 

I have looked at some of the other quetions around this but I am not to sure where to start 

 

 

 

4 REPLIES 4
Highlighted
Community Hero

Re: updating Body of Email with groovy Script

May be more details on what you already have or more precise detials will help  to resolve quicker



Regards,
Rao.
Highlighted
Occasional Contributor

Re: updating Body of Email with groovy Script

Spoiler
 

I am after sample code for Groovy script 

 

As all i can find how to do it in VB or Java 

Highlighted
Community Hero

Re: updating Body of Email with groovy Script

Java code should exactly work in Groovy, try it out.


Regards,
Rao.
Highlighted
Occasional Contributor

Re: updating Body of Email with groovy Script

Found an quicker way to update body of txt by using 

 

def Email1 = testRunner.testCase.getTestStepByName("SendMail")

def message = "Test Message to body "

Email1.setPropertyValue("message", "$message")

New Here?
Join us and watch the welcome video:
Top Kudoed Authors