cancel
Showing results for 
Search instead for 
Did you mean: 

Handling click events for WPF buttons

SOLVED
Highlighted
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.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Handling click events for WPF buttons

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
[Community Expert Group]
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
Extensions available
3 REPLIES 3
Community Hero

Re: Handling click events for WPF buttons

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
[Community Expert Group]
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
Extensions available
New Contributor

Re: Handling click events for WPF buttons

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 

Community Hero

Re: Handling click events for WPF buttons

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
[Community Expert Group]
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
Extensions available
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2