Frage

We have a web application that can be tested using Selenium, but that's not enough because the web application will be used inside a WinForms application using the Web Browser control.

The WinForms app interacts with the content of the page hosted inside the Web Browser Control and viceversa.

We have tests on other layers like services, but we need to find a way to test the WinForms UI that interact with the Web Browser control.

Any suggestion?

War es hilfreich?

Lösung

What you need is a WinForm test automation. A friend of mine blogged about this recently; http://matthewskelton.wordpress.com/2012/01/08/test-automation-tools-for-winforms-desktop-applications/

Andere Tipps

In addition to the link which Myles kindly provided, I also blogged specifically about calling the WebBrowser control from C# WinForms applications here:

http://matthewskelton.wordpress.com/2007/04/21/calling-javascript-from-c/

Specifically, you can use Type.InvokeMember() to call JavaScript from C#.

In terms of testing this, I suppose you'd need to drop a JavaScript listener/logger into the DOM, hooking it onto a low-level event or prototype, and then log out to the JavaScript console.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top