Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Hi all

Coded Ui has option to run a selected test method by manually right click and Run Test. I need this functionality to be done through coding. can anyone suggest solution.




Thanks in Advance....
Karthik.R
Posted
Updated 17-Dec-14 17:00pm
v2
Comments
George Jonsson 17-Dec-14 23:23pm    
It is not dangerous to describe in more detail what you want to do, you know.

1 solution

This is an impossible question to answer without any knowledge about the test sequencer you are using or what kind of API the vendor is providing.

You are not saying if you want to do this from within a test method or by using an external application, for example for the purpose of automate some user interface tests.

If you want to do this from an external application, there are some options.

One way is to record mouse operations and play them as a macro. There are some softwares out there that has this functionality, but I have not used any such software in years so I can't recommend any good one.
Here is one web page a Google search came up with: Record Mouse Clicks And Keystrokes[^]

Another option is to use good old Spy++ and find out the ID's of the the different menu items and controls you need to manipulate.
Then you can use Win32 methods such as SendMessage or PostMessage in order to simulate mouse clicks.
In my experience this is easier if the UI is written in Win32 C++.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900