Sign in to follow this  
Followers 0
Tapes

Software Testing

6 posts in this topic

Hi, I am new to AutoIt and I am in need of some answers! I am trying to test an external software, and within the softeware I need to click certain tabs and buttons for the test. I know you can write a script to click the button based on the position of the button on the screen, but this wouldn't work if I wanted to test the same software on a different monitor with a different size. I was wondering if I could write a comman (or If there is any possible way within AutoIt) to click the button based on more of knowing exactly "what" I'm clicking rather than using the position of (x,y) variables of the button to mouse click it. Sorry If that's very confusing! I am in need of answers, so any help would be appreciated! Thank you!

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!

What you are looking for is function ControlClick. Using the AutoIt Window Info tool you can get the ID, class etc. of the button you want to click.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Awesome that helps Thank you! I have been messing around with it, but I am having trouble clicking drop down menus. For example lets say I wanted to ControlClick the File Menu annd then clikc New in Notepad. Is there a way to accomplish this?

Edited by Tapes

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Try the ControlSend function. Send something like this: !fn. And remember, the help file can be your best friend! There are also working examples for just about every native AutoIT function in there.

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

How about function WinMenuSelectItem?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks for the help! I'm going to try messing around with these functions a bit :)

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