Sign in to follow this  
Followers 0
andreib

How can I see HTMLayout controls using AutoIT Window Info?

9 posts in this topic

Hello Guys,

I am new in AutoIT scripting. I find it very cool, efficient and time saving. I am a QA Engineer trying to automate most of the routine tasks I run on a daily basis. The company I work with is using HTMLayout for building the GUI for their software, thus my problem. I was only able to automate tasks based on mouse coords like:

MouseClick("left", 120, 127)

I would very much like to know if it possible to somehow see the controls on HTMLayout GUIs, the text and the hidden text using AutoIT Window Info and use them in my scripts. e.g. click a button instead of clicking on the mouse coords of that button.

At the moment, if I drag and drop the finder tool over my form I only get the title and the class name. No controls, no text.

>>>> Window <<<<
Title: Dashboard
Class: securitydashboard
Position: 580, 265
Size: 760, 510
Style: 0x960A000C
ExStyle: 0x00050000
Handle: 0x00000000000806FC
>>>> Control <<<<
Class:
Instance:
ClassnameNN:
Name:
Advanced (Class):
ID:
Text:
Position:
Size:
ControlClick Coords:
Style:
ExStyle:
Handle:
>>>> Mouse <<<<
Position: 1303, 280
Cursor ID: 0
Color: 0xFEFEFE
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
>>>> Hidden Text <<<<

Thank you for your help! It is much appreciated.

Andrei

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

The AutoIt Window Info tool is not well suited for this task. You should look at the functions in the help file beggining with the prefix _IE. For example _IEAction(). I haven't used them extensively, so I don't exactly know what they all do.

Edited by czardas
1 person likes this

Share this post


Link to post
Share on other sites

Googling offers

As for WindowInfo, it is useful mostly for elements having their own handles. To manipulate with HTMLayout, you can use the above udf or work with dll directly

1 person likes this

Share this post


Link to post
Share on other sites

If you plan to do a lot of work manipulating IE, I suggest you download and install http://www.debugbar.com/.

That will give you all the information you are hoping to find with the window info tool.


[center][/center]

Share this post


Link to post
Share on other sites

Thank you to all! I will try to follow your advices.

Andrei

Share this post


Link to post
Share on other sites

Can someone give me a very simple example of a GUI form created with HTMLayout with just a single button? Then a small au3 script which does nothing else than pressing that button based on its control name/id.

Many many thanks!

Andrei

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

W3Schools can provide yoiu with a button: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_button_test

You should make an attempt yourself and see how far you get.

Sorry, I think you missed my point. I am not looking for just a html file with a button. I am trying to have a form generated using HTMLayout.dll (it is a way to use html/css for creating Desktop GUIs, not Web) and, the most important part, an AutoIT script that auto clicks the controls of that form based on their id/name/index, etc.

I basically work with a desktop app having its GUI made with HTMLayout. I am trying to find a way to automatically test it by clicking on its elements. The issue is that I cannot see how I can click the controls (mouse coordinates are not an option).

Dose anyone else have an idea where to look?

Thanks!

Andrei

Edited by andreib

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Ah okay, that's a different story altogether. I did take a quick look at some of the _IE functions, but I seeemed to get some errors. I'm running different versions of AutoIt on different machines (not all of which are available to me ATM). I still need to do some updates on the computer I'm using ATM and run a few tests. It could be that I overlooked something. Perhaps I just need to study it a bit, I'm not sure. Someone with more expertise in this area may be able to help you.

Edited by czardas

Share this post


Link to post
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
Sign in to follow this  
Followers 0