开发者

Is there any tool to generate Watin page objects from a given web page?

开发者 https://www.devze.com 2023-03-03 17:25 出处:网络
WatiN looks nice, but generating page objects by hand seems very tedious. Is there any browser plugin 开发者_StackOverflow中文版or other tool that would allow me to click a few elements (form fields

WatiN looks nice, but generating page objects by hand seems very tedious.

Is there any browser plugin 开发者_StackOverflow中文版or other tool that would allow me to click a few elements (form fields, divs, etc) and export the source of a page object for these elements? It looks like an obvious addition to the framework.

Thanks,

Adrian


Have a look at this blogpost.

http://slmoloch.blogspot.com/2009/12/design-of-selenium-tests-for-aspnet.html

It discusses a mixture of the xpather tool and T4 templates to autogenerate pageobjects. Its also a nice series on how to setup a selenium environment for .Net, most of the things are also applicable for Watin tests.


I've been curious about Page Object generation as well. However, instead of having to load a browser and click around like a recorder, I was thinking of discovering the pages and controls through reflection of the web app dll.

I have not heard of a tool that does this, but I'm just putting this out there in case you wanted to spend a little bit of time to discover and generate the code exactly they way you want.

Hope this helps.


How about the WatiN Test Recorder?

http://watintestrecord.sourceforge.net/

0

精彩评论

暂无评论...
验证码 换一张
取 消