rodent1 Posted April 11, 2014 Posted April 11, 2014 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!
junkew Posted April 19, 2014 Posted April 19, 2014 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 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
rodent1 Posted April 23, 2014 Author Posted April 23, 2014 OK, I looked at the pages, and you're right, it seems to support accessibility. But I have no idea where to begin to use wxaccessible with IUIAutomation. Any thoughts?
junkew Posted April 23, 2014 Posted April 23, 2014 Normally its best to start at the beginning. Post what you have tried. Use the simple spy output of the object you want to handle. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
rodent1 Posted May 8, 2014 Author Posted May 8, 2014 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
LarsJ Posted May 8, 2014 Posted May 8, 2014 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. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
rodent1 Posted May 12, 2014 Author Posted May 12, 2014 I can't select anything smaller than the selection you see in the screenshot. It's the same with the autoit tool.
junkew Posted May 12, 2014 Posted May 12, 2014 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 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now