I'm trying to load a ".txt" file from local to MFC application using pywinauto or at-least I need to able to type the text in the "File name:" section and then able to click Open button (as shown in the below screenshot).
Following is the code which i'm using:
from pywinauto.application import Application
import time
app = Application().Start(cmd_line=u'"path of the application (.exe)" ')
window = app.Dialog
window.Wait('ready')
button = window.Button
button.Click()
app.Open.edit.SetText("Test_File%r.txt" % b)
app.Open.Open.Click()
I searched many blogs for this and couldn't find the solution. Any help is appreciated!!! Thanks.