Home > OS >  Run a Selenium test from a windows forms c# application
Run a Selenium test from a windows forms c# application

Time:11-05

I have an XUnit test project called Example2 and in it I have some tests ready.

Now I created a C# windows forms interface project and added a button to it.

I would like when I click on the button it runs the test that is in example2.

Can anyone help me to do this?

CodePudding user response:

Try searching google before asking the question on this forum, the community is very strict with this.

Here you will find the same question i guess: How to execute XUnit tests via code

I guess the top answer is working, as others have upvoted it.

The only thing missing is your "button_Event": https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-respond-to-windows-forms-button-clicks?view=netframeworkdesktop-4.8

I suspect you are new to WinForms. Try playing around with different events that you will find in the properties window in visual studio, after clicking on the button. Here you will also find the button clicked event.

  • Related