Jump to content

Web Test Engine - how to read the screeen?

Recommended Posts



I've been unable to find a way to solve this. (OK: I know programming, but not AutoIT in-depth and graphics is completely new land to me)

Background: A friend of mine is developing a webpage. I've promised to build a "test-engine"

Some of the webpages have dynamic 'markers'. I've tried to illustrate it below:


Buttons on the screen changes colours depending on progress in filling in data. (And yes: The change caption too. "Continue" may be a grey area with "Warning" in white text if eg phone-number is not 8 digits (common in Denmark, and the words are obvious different in danish and english :-) )

I know how to simulate user-input (data-entry, mousemovements and -clicks). Setting up the specifics for witch test-case results in what kind of respond on screen should be more or less just making a table or similar.

My own idea was to save the different "buttons" as BMP / JPG / PNG and search on-screen for a match. (Or save current screen and then compare.) Any clues or suggestions?

When the basic test-engine is created it should be able to run in different combinations of screeen-resolutions, browsers and windows versions. (Ideally even in Unix, but that, I guess will require a setup with Unix running in a virtual client. As for now this completely out of scope :-) ).

I'm aware, I may need a "set" of images and coordinates depending on screen-resolutions. That's OK if so.

As for speed, it may be an issue of convenience, but not a focus area. The most important is, the test-engine actually recognises the different types of responses based on colour and/or text-patterns.

A solution where I could have an array to the different pictures is what I had in mind. I know the webdesign may alter/change, as in:image.png.702740f3ef9c965828748369594b98a9.png

( Can't-Continue (informations is still missing), Continue, Error and Warning)

So something like:

<Pseudo code>

>> Read button info from file:
        Path to File with Image
        Area on screen to search (X1, Y1, X2, Y2)

>> Test for response:
        For $iCounter = 1 To <Number of Image-Files>
            If <Search for Image> Then
                $sCurrentImage = <Keyword from file>

Any suggestions?

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