My sample file in one project is:
import os
feature_name = 'neelam'
combo_boxes = {"'Primary CAN InterfaceComboBox": ["[CanSim, CanSim]", "best_match"],
"'Secondary CAN InterfaceComboBox": ["[CanSim, CanSim]", "best_match"],
"Seed Data SimulationComboBox": ["[Off, OFF]", "best_match"],
"Planter TypeComboBox": ["[_2160_FFT_24R30, 2160 Front Fold 24 Row 30 Inch]", "best_match"],
"BrandComboBox": ["[CaseIH, Case IH]", "best_match"],
"LATAM Gran Fertilizer InstalledComboBox": ["[Hydraulic, Hydraulic]", "best_match"],
"DiagnosticsComboBox": ["[On, ON]", "best_match"]}
for i in combo_boxes:
log_msg = 'Click on combo box {0} at {1}'.format(i, combo_boxes[i][0].split(",")[1][:-1])
print(log_msg)
Now I am trying to run sample file from another python script as given:
import os
script_string = r'C:\Neelam\Neelam_Dev\test_automation\FeatureTestScripts\Common\sample.py'
os.system(script_string)
But after running the second file, it is not printing the output of sample.py. It is just opening that file in Pycharm.