[NUnitAsp-devl] WmlTester
Brought to you by:
jlittle82
From: Cory F. <Cor...@mo...> - 2005-04-18 00:32:36
|
I've been working on implementing a WmlTester to test Mobile Web Controls. I've gotten some preliminary stuff working, but it is so similar to the HtmlTester that I though I would relay the differences and see if there is a better approach. The first assumption is that the user will be using a default User Agent different from the NUnitAsp one so that WML is returned to the client. That was easy enough by creating a WapFomTestCase which sets the user agent in BaseSetUp(). If they don't use a UA that ASP.NET recgonizes, they will get HTML back. The second assumption is that the user will be using GET requests for everything. I know that Microsoft allows for "POST" as a valid method in a mobile:Form, but most mobile phones have no idea what to do with that (except maybe the MS Phones - we don't work with those). Outside of that, the biggest difference is the ParseInitialFormValues(). With WML content, the inputs that are displayed do not have a name attribute that matches the AspId. There is a way to map it (I've attached my stab at it). For submits, it is just a get request to a URL specified in a <go> tag. What would be the easiest way to go about adding support for this? I know there are certain changes - for example the DTD (I had created a WapPage class and used all of the methods from WebPage except for using the WML DTD). And some of the methods in WebPage and other classes might have to be changed to internal virtual. But am I off my rocker for thinking this should be fairly simple to do? Thanks! Cory |