Element Class Mapping Table
This document provides a mapping table between the html element in a webpage and the matching class in WatiN.
| Html element | WatiN Class | Example | ||
|
<a /> |
Link |
var link = browser.Link(linkId); |
||
|
<area /> |
Area |
var area = browser.Area(Find.ByAlt(alttext)); | ||
|
<button /> |
Button |
var button = browser.Button(buttonId); |
||
|
<div /> |
Div |
var div = browser.Div(divId); |
||
|
<form /> |
Form |
var form = browser.Form(formId); |
||
|
<frame /> |
Frame |
var frame = browser.Frame(frameId); |
||
|
<frameset /> |
FrameCollection |
var frames = browser.Frames; |
||
|
<iframe /> |
Frame |
var frame = browser.Frame(iframeId); |
||
|
<img /> |
Image |
var image = browser.Image(imageId); |
||
|
<input type=button/> |
Button |
var button = browser.Button(buttonId); |
||
|
<input type=checkbox/> |
CheckBox |
var checkbox = browser.CheckBox(checkboxId); |
||
|
<input type=file/> |
FileUpload |
var upload = browser.FileUpload(fileuploadId); |
||
|
<input type=hidden/> |
TextField |
var textfield = browser.TextField(hiddenId); |
||
|
<input type=image/> |
Image |
var image = browser.Image(imageId); |
||
|
<input type=password/> |
TextField |
TextFieldCollection |
Ie.TextField(passwordId) |
0.7 |
|
<input type=radio/> |
RadioButton |
RadioButtonCollection |
Ie.RadioButton(radioId) |
0.7 |
|
<input type=reset/> |
Button |
ButtonCollection |
Ie.Button(resetId) |
0.7 |
|
<input type=submit/> |
Button |
ButtonCollection |
Ie.Button(submitId) |
0.7 |
|
<input type=text/> |
TextField |
TextFieldCollection |
Ie.TextField(textId) |
0.7 |
|
<label /> |
Label |
LabelCollection |
Ie.Label(elementId) |
0.7 |
|
<option /> |
Option |
OptionCollection |
Ie.Select(selectId).Options |
1.0 |
|
<p /> |
Para |
ParaCollection |
Ie.Para(pId) |
0.7 |
|
<select /> |
Select |
SelectCollection |
Ie.Select(selectId) |
0.7 |
|
<span /> |
Span |
SpanCollection |
Ie.Span(spanId) |
0.7 |
|
<table /> |
Table |
TableCollection |
Ie.Table(tableId) |
0.7 |
|
<tbody /> |
TableBody |
TableBodyCollection |
Ie.TableBody(tablebodyId) Ie.Table(tableid).TableBodies |
1.0 |
|
<td /> |
TableCell |
TableCellCollection |
Ie.TableCell(tablecellId) or Ie.Table(TableId).TableRows[0].TableCells[0] |
0.7 |
|
<textarea /> |
TextField |
TextFieldCollection |
Ie.TextField(textareaId) |
0.7 |
|
<tr /> |
TableRow |
TableRows |
Ie.TableRow(tablerowId) or Ie.Table(TableId).TableRows[0] |
0.7 |
|
All elements, also the ones not mentioned in this list |
Element and ElementsContainer |
ElementCollection |
Ie.Element(elementId) Ie.Element(tagname, elementId) |
0.9 1.2 |

