Forum Discussion

chiragverma123's avatar
chiragverma123
Contributor
8 years ago
Solved

Running a external Selenium Python script from Grrovy script using SOAPUI

 I would like to run external python selenium scripts located in my project folder. Is it possible to do so? My goal is to run something on the UI before running the API test on SOAPUI. If yes, How c...
  • chiragverma123's avatar
    8 years ago

    This problem is now resolved. Using the following script:

     

     

    def cmdArray2 = ["python", "C:/Users/Desktop/SOAPProject/test.py"]
    def process = new ProcessBuilder(cmdArray2).redirectErrorStream(true).start()
    process.inputStream.eachLine {
    log.warn(it)
    }
    process.waitFor()
    return process.exitValue()