Jump to content

wxWindowClass etc, widgets problems


Recommended Posts

Hello everyone. 
I am trying to automate a program that's written using "widgets". It has controls that don't work well with the AutoIt Window Info app, or with spy. For example, one control is of class wxWindowClassNR28, and its text property is "wxlistctrlcolumntitles". The actual displayed text is empty.
It seems to be drawn inside of a control of class "wxWindowClassNR" with text property "CNOwnerDrawSplitterWindow". There are many layered controls. When I use the _WinAPI_GetWindow command to get the children, I have no idea what child control I have from the text or the class name, and since not all of the children are visible or on top, the best I have been able to do is get their coordinates, do a screen capture at the coordinates, use OCR and hope to have it match something I expect. I need a better way. I have tried Junkew's IUIAutomation framework, but did not get anywhere.
I need new ideas.
Has anyone been successful using Autoit on this type of controls?
In case someone is familiar with this, the program is a printing application called CWS.exe, "command work station".
 
Thanks!
Link to comment
Share on other sites

  • 2 weeks later...

Not sure but it looks like it supports accessibility

http://docs.wxwidgets.org/trunk/classwx_window.html

wxAccessible *  GetAccessible ()  

Returns the accessible object for this window, if any. 

http://docs.wxwidgets.org/trunk/classwx_accessible.html

as such it should be possible to get working with IUIAutomation

Link to comment
Share on other sites

  • 2 weeks later...

OK, I attached spy capture.zip. It has 2 screenshots and a text file. 

1- cws tabs.jpg shows the app UI, and 2 tabs are circled. I want to be able to select one of those tabs.

2- "cws tabs seen by spy.jpg" shows what is selected when I park the mouse on one of the tabs.

Both tabs are drawn inside the same rectangle, and the rectangle extends farther to the right.

3- spy capture.txt contains all the text that spy demo displayed when it captured all the data about what was selected in "cws tabs seen by spy.jpg"

I work with languages. I'd like to automate capturing strings and comparing them to spreadsheets to make sure the correct translated strings were used in the right place.

So this is what I'd like to do for the beginning:

1- click on the Device Center tab. Expected result: the Device Center tab should be selected, and sub tabs should be displayed.

2- capture the text for each of the sub tabs so I can do my comparisons etc. 

Thanks!

spy capture.zip

Link to comment
Share on other sites

In the 2-picture it seems as if you have selected the entire tab control with the Spy tool.

Are you able to select a single tab e.g. Device Center? You should see a red border only around the "Device Center" text. If you are able to do that, will you copy the information from the Spy tool to a code/text box.

Link to comment
Share on other sites

I looked on the internet for some wxWidget demo.

I used that to see what the simple spy is recognizing and apparently it detects all wxWidget.

See this link

ftp://biolpc22.york.ac.uk/pub/binary/wxWidgets-WidgetsDemo-Windows.zip

maybe AxTK is a direction: AxTk could stimulate work and ideas on a better accessibility approach within wxWidgets itself!

I also tried Audacity and in general I can recognize a lot (although not everything) with the simple spy

http://audacity.sourceforge.net/?lang=en

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...