Have been in a bind over the weekend.
I am attempting to create a Python Application that will give users the ability to run .Robot files (or Test Cases) (from within Python)
I am attempting to run these files through the use of the 'subprocess' module, but I continually receive the following error message :
'FileNotFoundError: [WinError 2] The system cannot find the file specified'
I have included 'import subprocess'
I have also declared the location of the .Robot Test Case as a variable:
Location = r'C:/Users/verti/PycharmProjects/ChristSax.com/ChristSaxTestSuite/PageSmokeTest.Robot'
Within my code, I've attempted to call the Robotframework file with the following statement :
def AutomatedSmokePage():
print("Automated Page Smoke Tests now running...")
subprocess.call(['pybot',Location])
I am currently using Python 3.6.1 and Robot Framework version 3.0.2
Any help would be appreciated. If you know of a better means to accomplish the same task, please let me know.
pybot C:/Users/verti/PycharmProjects/ChristSax.com/ChristSaxTestSuite/PageSmokeTest.Robotos.chdir("C:/Users//verti/PycharmProjects/ChristSax.com/ChristSaxTestSuite/")os.system('pybot -N PageSmokeTest -r ' 'AutomatedSmokeTest.html -l AutomatedSmokeTest.html -o ' 'AutomatedSmokeTest.xml AutomatedSmokeTest.robot')