-1

Is it possible to execute a piece of commands written in text file using pycharm?

Actually I am looking to execute a command "allure serve " (within from my selenium pytest framework) once after I close the browser OR once after I perform the 'yield'

Is there any way to write "allure serve " command inside my pytest framework or can I write this command in text file and can read the file once I perform yield?

1 Answers1

0

Yes, you can execute a system command with Python. Please have a look at the question How to execute a program or call a system command from Python .

You could consider using an external package to integrate pytest with allure. Please check the question Generating allure report using pytest.

Marco.S
  • 383
  • 2
  • 10