Click here to Skip to main content
15,867,686 members
Articles / Web Development / ASP.NET
Tip/Trick

How to capture basic HTML controls using WatiN

Rate me:
Please Sign up or sign in to vote.
4.33/5 (7 votes)
3 Oct 2013CPOL 12.8K   7   2
How to capture basic HTML controls using the WatiN control.

Introduction

Web application controls can be captured using the WatiN class. The WatiN class has all the controls corresponding to HTML elements. Sometime it is very confusing for the programmer to identify the ASP.NET control and the WatiN control.

Following are illustrations of capturing some HTML controls:

Textbox

HTML Element: <input type=text/>

WatiN class: TextField

dd1.png

Dropdown

HTML Element: <Select/>

WatiN class: SelectList

dd2.PNG

FileUpload

HTML Element: <input type=file/>

WatiN class: FileUpload

d3.png

Checkbox

HTML Element: <input type=checkbox/>

WatiN class: CheckBox

dd4.png

Radiobutton

HTML Element: <input type=radio/>

WatiN class: RadioButton

dd5.png

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Tester / Quality Assurance
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 4 Pin
URVISH_SUTHAR13-Oct-13 20:38
URVISH_SUTHAR13-Oct-13 20:38 
nice, good to have sample app if you can share
GeneralRe: My vote of 4 Pin
MinniPandey14-Nov-13 19:36
MinniPandey14-Nov-13 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.