Skip to content

List of supported elements

caius edited this page Aug 14, 2010 · 6 revisions

Default how parameters

Every element method has a default how parameter, so that you can only call them with one parameter; the what parameter. However, beware that even if you can code more quickly and your code becomes more compact, it’s readability and clarity may suffer.


  @browser.button('big').id # Gets the id attribute of a button with value="big" equivalent to
  @browser.button(:value, 'big').id

Form elements

Method Element Element class Default how parameter
button
<button> <input type="submit"> <input type="button"> <input type="image">
Celerity::Button :value
check_box
<input type="checkbox">
Celerity::CheckBox :name
file_field
<input type="file">
Celerity::FileField :name
form
<form>
Celerity::Form :name
hidden
<input type="hidden>
Celerity::Hidden :name
label
<label>
Celerity::Label :text
option
<option>
Celerity::Option :text
radio
<input type="radio">
Celerity::Radio :name
select_list
<select>
Celerity::SelectList :name
text_field
<textarea> <input type="text"> <input type="invalid_type"> <input>
Celerity::TextField :name

Table elements

Method Element Element class Default how parameter
cell
<td>
Celerity::TableCell :id
row
<tr>
Celerity::TableRow :id
table
<table>
Celerity::Table :id
tbody
<tbody>
Celerity::TableBody :id
tfoot
<tfoot>
Celerity::TableFooter :id
th
<th>
Celerity::Th :id
thead
<thead>
Celerity::TableHeader :id

Other

Method Element Element class Default how parameter
area
<area>
Celerity::Area :id
dd
<dd>
Celerity::Dd :id
div
<div>
Celerity::Div :id
dl
<dl>
Celerity::Dl :id
dt
<dt>
Celerity::Dt :id
em
<em>
Celerity::Em :id
frame
<frame> <iframe>
Celerity::Frame :name
h1, h2, h3, h4, h5, h6
<h1> <h2> <h3> <h4> <h5> <h6>
Celerity::H1, Celerity::H2, … :id
image
<img>
Celerity::Image :src
li
<li>
Celerity::Li :id
link
<a>
Celerity::Link :href
map
<map>
Celerity::Map :id
meta
<meta>
Celerity::Meta :id
ol
<ol>
Celerity::Ol :id
p
<p>
Celerity::P :id
pre
<pre>
Celerity::Pre :id
span
<span>
Celerity::Span :id
strong
<strong>
Celerity::Strong :id
ul
<ul>
Celerity::Ul :id