-->

find qwidget object text by using pywinauto

2019-08-10 22:08发布

问题:

I work as a test engineer. I have to test an application(softphone) which is done by using QWidget. I'm using python - pywinauto. I can click buttons and make calls. There is a qwidget object named with statusLabel. At the beginning of the test, "Ready" text written on it. When I make a call, this text is changed like "Calling..", "Call Established" and so on. I want to check the text of that widget. Do you have any idea?

回答1:

Pywinauto uses standard windows API calls. Unfortunately many UI libraries (like Swing/QT/GTK) do not respond in a typical way to the API calls used - so unfortunately pywinauto often cannot get the control information. (P.s. I am the Author of pywinauto).