Coderv Posted May 12, 2017 Posted May 12, 2017 Hello there, I am new to AutoIt and using robotframework for doing automation for my application. I am having a problem where AutoIt window spy tool is not able to recognize the below. 1. Menu bar of my application. 2. Texts from the dialog box. The application was built using .NET
MattHiggs Posted May 12, 2017 Posted May 12, 2017 Ok so the window tool can't really capture the menu bar. I have a Autoit GUI Script and the window capture tool can't pick up any information from the menu bar for the menu bar either. You shouldn't really need it. Is there a reason you are trying to get a handle to it? As for the dialog box... Are you referring to an edit control or a message box.. If you could post a picture of the item giving you the issue with the text (maybe including in the screenshot what the Autoit Window capture tool does read from it), I might be able to help further.
Coderv Posted May 14, 2017 Author Posted May 14, 2017 (edited) Thanks Matt. With respect to the menu items, I am using mouse clicks which is fine for now. I am having difficulties in getting the texts from lists (mentioned as dialog box in my previous post, sorry). This is the list control (from AutoIt finder) >>>> Control <<<< Class: WindowsForms10.SysListView32.app.0.378734a Instance: 1 ClassnameNN: WindowsForms10.SysListView32.app.0.378734a1 Name: Advanced (Class): [CLASS:WindowsForms10.SysListView32.app.0.378734a; INSTANCE:1] ID: 658428 Text: Position: 23, 93 Size: 736, 368 ControlClick Coords: 407, 114 Style: 0x56010141 ExStyle: 0x00000200 Handle: 0x000A0BFC Questions: 1. AutoIT could not really scan the texts(table of contents) present in the list. What is the reason behind it? Am I doing it wrong? 2. I am trying to use the ControlListView keyword (Robotframework - AutoIT) and trying to get the texts from it. Here is the below snippet. Control List View My app window title ${EMPTY} [ClassnameNN:WindowsForms10.SysListView32.app.0.378734a1] SelectAll ${EMPTY} ${EMPTY} ${temp} = Control List View My app window title ${EMPTY} [ClassnameNN:WindowsForms10.SysListView32.app.0.378734a1] Getselected 1 ${EMPTY} log ${temp} Please correct if the above code is wrong or suggest me any valid ones which I have to look for. Edited May 14, 2017 by Coderv Edited question
Coderv Posted May 16, 2017 Author Posted May 16, 2017 @MattHiggs - Hello Matt, Sorry for the urge. Do you have updates please?
MattHiggs Posted May 16, 2017 Posted May 16, 2017 Do me a favor. Try scanning the control with this tool: https://1drv.ms/u/s!AndRKxKyXo6AgYFUDrqh9NAmZQ_-iA What does this tool say?
Coderv Posted May 16, 2017 Author Posted May 16, 2017 (edited) @MattHiggs Hello Matt, Please see below. The Text field for that list control shows blank. Kindly help. Also attached a sample drafted format of how that list control content looks like (not the actual content). Window: title - App title Class - WindowsForms10.Window.8.app.0.378734a Style - 0x17CF0000 WS_BORDER, WS_CAPTION, WS_CLIPCHILDREN, WS_CLIPSIBLINGS, WS_GROUP, WS_MAXIMIZE, WS_SIZEBOX, WS_SYSMENU, WS_TABSTOP, WS_VISIBLE ExStyle - 0x00050100 WS_EX_APPWINDOW, WS_EX_CONTROLPARENT, WS_EX_WINDOWEDGE Handle - 0x00000000001910C4 Position - -8 -8 Size - 1936 1056 PID - 4228 Path - Path to the app Control: Class- WindowsForms10.SysListView32.app.0.378734a Instance - 1 [CLASS:WindowsForms10.SysListView32.app.0.378734a; INSTANCE:1] ID- 1315174 [CLASS:WindowsForms10.SysListView32.app.0.378734a; ID:1315174] Style - 0x56010141 0x00000141, WS_CHILD, WS_CLIPCHILDREN, WS_CLIPSIBLINGS, WS_TABSTOP, WS_VISIBLE ExStyle - 0x00000200 WS_EX_CLIENTEDGE Position = 23 93 Size - 736 368Text - (empty) New Bitmap Image.bmp Edited May 16, 2017 by Coderv Inserted sample list
LarsJ Posted May 17, 2017 Posted May 17, 2017 .NET Windows Forms can be automated with UI Automation code. Read this post carefully. 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
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