Jump to content

Automating Testing on Touch Screen


Recommended Posts

We have a purchased application which is deployed on the shop foremen's Asus laptops.  We installed a new version and all hell broke loose because of a bug in the vendor's code.

I am tasked with writing an automated regression test script to test the application whenever we upgrade the vendor's software.  I can do this with mouseclick but I am told to do the testing like the foremen do with touching of the screen.  I don't know if Autoit can do this - it is unclear from the forum threads here (which is probably because I've never needed to automate a touch pad and I am ignorant of what to do.)

I have been requested to record what the lead forman does on his touchpad and then use that as input for my regression test scripts.  I'd like to get the position (x,y), the press duration, the press down strength, and the size of the press down fingerprint.  Once I can do that I'll run an Autoit script on the foreman's laptop and record what he's doing.

I'll then edit them into a coherent set of functions calls and write some repeatable testing scripts.  However, to meet the plant manager's requirements I need to 'simulate' as if the foreman actually pressed the screen with his finger - that is, run it through the same portion of the vendor's code as would be used on the shop floor.

While not a neophyte at Autoit, I really am clueless about touch pads/screens.  I've looked at the threads here and either didn't see what I am looking to do or the discussion was above my head and didn't understand it.  Any guidance would be very much appreciated.  As the vendor bug caused quite a bit of scrap...and as we are expecting a number of upgrades in 4Q22 and 1Q23...this is a priority for my bosses.

Thanks in advance!

Link to comment
Share on other sites

Thank you.  I saw this thread as a potential to get the foreman's input.  I read through the code but didn't understand how to use it.  When I inspect the screen I don't get controls - I believe the entire screen is a control for this software.  I can get the name of the window and the window control 'handle' using the Autoit window info tool.  However, all the spots where you are supposed to 'press' to activate valves are not showing as controls when I hover over them or click on the 'buttons'.  We do not have the source code for this application so I can't dig deeper (or if a deeper dive is possible, I don't know how to do it.)

This is proprietary software so my boss doesn't want me to display it anywhere outside the company.  Given the cost the bug in the latest software update caused he may soften that stance if I push it and if it is needed somehow.  However, in the end it is a window with some display stuff and some 'button' and 'slider bar' icons that respond to the foreman tapping the screen or tapping and sliding their finger (the tap and slide is for a control function we do not currently use so if that can't be captured then no biggie - I was going to model that for completeness but it is really out of scope for the current specs.)

The window control info is:

Advanced Mode   [CLASS:vendorNameWindowClass; INSTANCE:1]

ID <blank - no value displayed>

Handle   0x0003006C

Capturing what the foreman actually does is part 1.  Part 2 is then replaying and simulating the touchscreen taps via Autoit.  Is that something you have done/can be done?  If there is no way to simulate the actual foreman touch actions then the first part of capturing his motions is still useful as I could simulate his actions with 'mouseclick' but it is less desirable than actually simulating the touching of the screen.

Thank you in advance for any help you can give!

Link to comment
Share on other sites

Oh, you want to simulate touches on screen.  I am afraid that my example is not what you want.  But I have found this :


Since I do not have a touch screen device, I cannot test it but MSDN is describing the API here. With the AutoIt example made by ozz, you should be good to go.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...