I'd like to control MobaXterm app with Python and trying to find a way for the code to read and fetch the string from the promp in each tab (terminal).
from pywinauto.application import Application
app = Application(backend='uia').start('"C:\\Program Files (x86)\\Mobatek\\MobaXterm\\MobaXterm.exe"').connect(title='val',timeout=100)
textEditor = app.val.child_window(control_type="Tab").wrapper_object()
print(textEditor.Edit.get_line(0))
textEditor.type_keys("^{TAB 2}")
textEditor.type_keys("test",with_spaces = True)
I tried to use get_line above, but it gives the following error:
print(textEditor.Edit.get_line(0))
AttributeError: 'TabControlWrapper' object has no attribute 'Edit'
Can you help me to find a way?