Ask a Question

Handling click events for WPF buttons

SOLVED
munteanadrian88
New Contributor

Handling click events for WPF buttons

Can you please provide an example for handling a click event on a WPF button? May someone help me with this, please?

 

Thanks in advance,

Adrian M.

3 REPLIES 3
tristaanogre
Esteemed Contributor

I'm not sure what the problem is you're experiencing.  If the WPF button is properly recognized by TestComplet, simply calling Aliases.MyApp.MyButton.Click() should click the button.  Can you share more details as to what the specific problem is that you need to solve?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

When I click a specific button automatically, I want to trigger an event which can fill out some input datasets, is there any way we can do that by using events? (e.g. OnLogError Events from TestComplete)

 

Adrian Muntean 

You can't create custom events necessarily in TestComplete to perform those kinds of tasks.  What you could do is write a Script routine to click on WPF buttons so that, everytime you call that routine, it a) clicks on the button and b) fills in the desired data.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: