Skip to content

Instantly share code, notes, and snippets.

@gauravkhuraana
Created October 18, 2017 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gauravkhuraana/6ce70539eae056584b459256f09819d2 to your computer and use it in GitHub Desktop.
Save gauravkhuraana/6ce70539eae056584b459256f09819d2 to your computer and use it in GitHub Desktop.
Clear log-output for soapui Groovy script.
// Remember script log and log-output are different things. The below script is for the log-output which comes below the log-output
//Note that in ReadyAPI 2.1 you will need to use the following script:
import com.eviware.soapui.SoapUI
log.info("test")
//Writing to the log is executed in the separate thread, so it is need to wait some time to get all notifications.
sleep(1000)
def teststep = context.getCurrentStep()
def tesStepPanel = SoapUI.getDesktop().getDesktopPanel(teststep)
if(tesStepPanel != null) {
tesStepPanel.getComponent(2).getComponent(0).getComponent(1).getComponent(2).getComponent(0).clear()
}
//Note that in ReadyAPI 2.2 you will need to use the following script:
import com.smartbear.ready.core.ApplicationEnvironment
log.info("test")
//Writing to the log is executed in the separate thread, so it is need to wait some time to get all notifications.
sleep(1000)
def teststep = context.getCurrentStep()
def tesStepPanel = ApplicationEnvironment.getDesktop().getDesktopPanel(teststep)
if(tesStepPanel != null) {
tesStepPanel.getComponent(3).getComponent(0).getComponent(1).getComponent(2).getComponent(0).clear()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment