This project is read-only.

handle component of qt Application

Jul 17, 2013 at 8:42 AM
Edited Jul 17, 2013 at 8:45 AM
HI ,

I create a program with 'cobrawinldtp/python' to automate QT based application.
please help me i can't handle my component (texteditor), i want set text value to my component but an exception is thrown "Unable to find Object: paneIN001".
with visual UI i get the name of the component is "IN001"
  • objectexist("wintitle", "paneIN001") return 1
    but settextvalue("wintitle", "paneIN001") thrown an exception "Unable to find Object: paneIN001".
thanks and regards
Jul 17, 2013 at 6:18 PM
We have limited the control (object/widget) type look up incase of text, please refer

Jul 18, 2013 at 9:23 AM
Hi nagappanal,

thank you for your reply,

here is a screen shot from the app:

the component IN001 (textEdit) is recognized as a LAYERED_PANE (paneIN001) by cobraldtp.

is there a way to set text in this component ?

thanks and regards
Jul 19, 2013 at 12:54 AM
Hi Hassen,

I think its either bug in designing the widget or in QT, do you want us to support the pane as text widget ? We can add it, not a big deal :-) But if something can be corrected on the AUT that will be nice. If it can't be changed, just let me know, we can support that type.

Jul 19, 2013 at 8:35 AM
Hi nagappanal,

Yes I want it, if you can support the pane as text that will be nice for me :) .

thanks and regards
Jul 19, 2013 at 10:14 PM
Fixed this in git head. Thanks for the bug report.
Jul 21, 2013 at 11:59 AM
Thanks for help.
I will try to create CobraWinLDTP.exe, I'll keep you informed :)
Jul 22, 2013 at 2:31 PM
Hi nagappanal,

after your modification the "settextvalue()" is recognized for the component "panaIN001" and i can set text for this component :-)

so I go to the next step to read data from "panetable1" for that I edit the file Tree.cs in the same way that you:

/ Tree.cs/
private AutomationElement GetObjectHandle(string windowName,
            string objName, ControlType[] type = null, bool waitForObj = true)
            if (type == null)
                type = new ControlType[4] { ControlType.Tree,
                    ControlType.List, ControlType.Table , ControlType.Pane  };
but the problem is getrowcount() return 0, however, that the table is filled :/

here is two screen shot:
is that I made a bad change in "Tree.cs" file ?

thanks and regards
Jul 22, 2013 at 11:51 PM
Can you please share a test binary with me ? that way we are sync. I also need to know the children of pane. We are looking for specific control types - I feel that your program should be fixed, rather Cobra/LDTP. Thanks
Jul 23, 2013 at 10:50 AM
Edited Sep 5, 2013 at 2:53 PM
Hi nagappanal,

for the children of pane please refer to this screen shot :

thanks and regards.
Jul 23, 2013 at 9:04 PM
Hi Hassen,

The children under table are not visible to accessibility layer and that's the reason, you are unable to access it. This has to be fixed in application end. Thanks Nagappan
Jul 24, 2013 at 8:05 AM
Hi Nagappan,

this use case will be supported in the next version of the Cobra-winldtp?

thanks and regards.
Jul 24, 2013 at 3:23 PM
Hi Hassen,

Its bug in your software :-) Your developer have to fix it. Table cell aren't visible. Thanks
Aug 6, 2013 at 1:01 AM
Can those controls be changed to appropriate QT control instead of pane ? in that case, its supported default by Cobra. Can your developer change those controls ? Thanks
Aug 6, 2013 at 8:11 AM
Hi Nagappan,

I do not have access to the code, I have the right to manipulate the application binary on BlackBox.

I may be forced to use OCR for recognition of text?

thanks and regards.
Aug 6, 2013 at 7:37 PM
Hi Hassen, I suggest to use Sikuli. Thanks
Aug 7, 2013 at 9:33 AM
Edited Aug 7, 2013 at 9:33 AM
yes I will use Sikuli, Yet it is still in the experimental part of the text recognition
anyway thank you for your help :)
Aug 12, 2013 at 8:42 PM
Can you ask your developers to change those controls to the one that are visible to MS Accessibility layer ? if its not a big hassle to them ? Thanks
Sep 5, 2013 at 2:42 PM
Thank you nagappanal for assisting me,
I finally finished this robot with Sikuli :)
Maybe i will use Cobra for other case!