Forum Discussion
yes - you can use
com.eviware.soapui.SoapUI.logMonitor.getLogArea("script log").clear()
Regards,
Vladimir
SmartBear Software
Note that below command only works if you run your tests from " Test case" or the " Test Steps group" -> just below test case name".
If you try to run below from a stand alone groovy step, this will not clear the log. Be aware! Had us wondering for few days.
com.eviware.soapui.SoapUI.logMonitor.getLogArea("script log").clear()
- tech3216 years agoContributor
com.eviware.soapui.SoapUI.logMonitor.getLogArea("Script Log").clear()
Capital S and Capital L in "Script Log"
then it works fine , thanks
- groovyguy8 years agoCommunity Hero
Been looking for this for some time. Awesome!
- gauravkhurana8 years agoOccasional Contributor
Below code actually clears the "log-output"
Ready aPI 2.1
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()
}
Don't forget to kudos/accept this as a solution
Related Content
- 3 years ago
Recent Discussions
- 19 days ago