I have a python script with the section below:
for index in range(1,10):
os.system('./test')
os.system('xdotool key Return')
What I want to do is to run the executable ./test, which brings up a QtGUI. In this GUI, a key press prompt buton comes up. I want to automate this key press of the GUI so that the executable continues.
My python script though runs the executable, the GUI prompt comes up and a key press is not entered until after the executable. Is there any way to fix this?