Create archives .log with Selenium results

0

I will try to explain as clearly as possible, the situation is this: I have the following project structure:

The directory where these two folders are located is code.

Inside ISV1 / testing I have the .py scripts of the tests I want to run (made with selenium) from server-test / script.py.

From each test I have to get the output in a .log and save it in ISV1 / testing / log.

I also have no idea how I can run the python scripts that contain the tests, since they are in another directory, I could not find the correct way to do it.

    
asked by Yamila Marucci 29.01.2018 в 22:58
source

1 answer

0

maybe you can do something like this, I've used it with python 2.7, I'm not sure its behavior is the same in 3.5

import subprocess

proceso = subprocess.Popen(["python",  "/path/script.py"], stdout=subprocess.PIPE)
salida = proceso.communicate()[0]
print(salida)
    
answered by 31.01.2018 / 07:04
source