Module: Watir::Container

Includes:
Exception
Included in:
Browser, Element, ModalDialog
Defined in:
lib/watir-classic/container.rb,
lib/watir-classic/supported_elements.rb

Overview

This module contains the factory methods that are used to access all html objects.

For example, to access a button on a web page that has the following html

<input type=button name='b1' value='Click Me' onClick='javascript:doSomething()'>

the following watir code could be used to click the button

browser.button(:name, 'b1').click

or to find the name attribute

browser.button(:value, 'Click Me').name

there are many methods available to the Button object

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Exception

message_for_unable_to_locate

Instance Attribute Details

#page_containerObject Also known as: browser

The Browser object containing this element.



20
21
22
# File 'lib/watir-classic/container.rb', line 20

def page_container
  @page_container
end

Instance Method Details

#aObject Also known as: link

Create an a html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.a(:text => /partial text/)

Search by id:

browser.a(:id => "htmlid")

Search by any arbitrary html attribute:

browser.a(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.a(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


56
# File 'lib/watir-classic/supported_elements.rb', line 56

support_element :a, :class => :Link

#abbrObject

Create an abbr html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.abbr(:text => /partial text/)

Search by id:

browser.abbr(:id => "htmlid")

Search by any arbitrary html attribute:

browser.abbr(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.abbr(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


59
# File 'lib/watir-classic/supported_elements.rb', line 59

support_element :abbr

#addressObject

Create an address html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.address(:text => /partial text/)

Search by id:

browser.address(:id => "htmlid")

Search by any arbitrary html attribute:

browser.address(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.address(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


60
# File 'lib/watir-classic/supported_elements.rb', line 60

support_element :address, :plural => :addresses

#alertAlert

Retrieve the JavaScript dialog instance. Supported dialogs are alert, confirm and prompt.

Returns:

  • (Alert)

    JavaScript dialog instance.



47
48
49
# File 'lib/watir-classic/container.rb', line 47

def alert
  Alert.new(self)
end

#areaObject

Create an area html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.area(:text => /partial text/)

Search by id:

browser.area(:id => "htmlid")

Search by any arbitrary html attribute:

browser.area(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.area(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


61
# File 'lib/watir-classic/supported_elements.rb', line 61

support_element :area

#articleObject

Create an article html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.article(:text => /partial text/)

Search by id:

browser.article(:id => "htmlid")

Search by any arbitrary html attribute:

browser.article(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.article(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


62
# File 'lib/watir-classic/supported_elements.rb', line 62

support_element :article

#asideObject

Create an aside html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.aside(:text => /partial text/)

Search by id:

browser.aside(:id => "htmlid")

Search by any arbitrary html attribute:

browser.aside(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.aside(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


63
# File 'lib/watir-classic/supported_elements.rb', line 63

support_element :aside

#audioObject

Create an audio html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.audio(:text => /partial text/)

Search by id:

browser.audio(:id => "htmlid")

Search by any arbitrary html attribute:

browser.audio(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.audio(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


64
# File 'lib/watir-classic/supported_elements.rb', line 64

support_element :audio

#bObject

Create an b html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.b(:text => /partial text/)

Search by id:

browser.b(:id => "htmlid")

Search by any arbitrary html attribute:

browser.b(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.b(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


65
# File 'lib/watir-classic/supported_elements.rb', line 65

support_element :b

#baseObject

Create an base html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.base(:text => /partial text/)

Search by id:

browser.base(:id => "htmlid")

Search by any arbitrary html attribute:

browser.base(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.base(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


66
# File 'lib/watir-classic/supported_elements.rb', line 66

support_element :base

#bdiObject

Create an bdi html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.bdi(:text => /partial text/)

Search by id:

browser.bdi(:id => "htmlid")

Search by any arbitrary html attribute:

browser.bdi(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.bdi(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


67
# File 'lib/watir-classic/supported_elements.rb', line 67

support_element :bdi

#bdoObject

Create an bdo html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.bdo(:text => /partial text/)

Search by id:

browser.bdo(:id => "htmlid")

Search by any arbitrary html attribute:

browser.bdo(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.bdo(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


68
# File 'lib/watir-classic/supported_elements.rb', line 68

support_element :bdo

#blockquoteObject

Create an blockquote html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.blockquote(:text => /partial text/)

Search by id:

browser.blockquote(:id => "htmlid")

Search by any arbitrary html attribute:

browser.blockquote(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.blockquote(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


69
# File 'lib/watir-classic/supported_elements.rb', line 69

support_element :blockquote

#bodyObject

Create an body html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.body(:text => /partial text/)

Search by id:

browser.body(:id => "htmlid")

Search by any arbitrary html attribute:

browser.body(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.body(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


70
# File 'lib/watir-classic/supported_elements.rb', line 70

support_element :body

#brObject

Create an br html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.br(:text => /partial text/)

Search by id:

browser.br(:id => "htmlid")

Search by any arbitrary html attribute:

browser.br(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.br(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


71
# File 'lib/watir-classic/supported_elements.rb', line 71

support_element :br

#buttonObject

Create an button html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.button(:text => /partial text/)

Search by id:

browser.button(:id => "htmlid")

Search by any arbitrary html attribute:

browser.button(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.button(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


72
# File 'lib/watir-classic/supported_elements.rb', line 72

support_element :button, :tag_name => [:button, :submit, :image, :reset], :super_class => :InputElement

#canvasObject

Create an canvas html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.canvas(:text => /partial text/)

Search by id:

browser.canvas(:id => "htmlid")

Search by any arbitrary html attribute:

browser.canvas(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.canvas(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


73
# File 'lib/watir-classic/supported_elements.rb', line 73

support_element :canvas, :plural => :canvases

#captionObject

Create an caption html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.caption(:text => /partial text/)

Search by id:

browser.caption(:id => "htmlid")

Search by any arbitrary html attribute:

browser.caption(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.caption(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


74
# File 'lib/watir-classic/supported_elements.rb', line 74

support_element :caption

#checkboxObject

Create an checkbox html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.checkbox(:text => /partial text/)

Search by id:

browser.checkbox(:id => "htmlid")

Search by any arbitrary html attribute:

browser.checkbox(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.checkbox(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


75
# File 'lib/watir-classic/supported_elements.rb', line 75

support_element :checkbox, :plural => :checkboxes, :class => :CheckBox, :super_class => :InputElement

#citeObject

Create an cite html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.cite(:text => /partial text/)

Search by id:

browser.cite(:id => "htmlid")

Search by any arbitrary html attribute:

browser.cite(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.cite(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


76
# File 'lib/watir-classic/supported_elements.rb', line 76

support_element :cite

#codeObject

Create an code html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.code(:text => /partial text/)

Search by id:

browser.code(:id => "htmlid")

Search by any arbitrary html attribute:

browser.code(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.code(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


77
# File 'lib/watir-classic/supported_elements.rb', line 77

support_element :code

#colObject

Create an col html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.col(:text => /partial text/)

Search by id:

browser.col(:id => "htmlid")

Search by any arbitrary html attribute:

browser.col(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.col(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


78
# File 'lib/watir-classic/supported_elements.rb', line 78

support_element :col

#colgroupObject

Create an colgroup html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.colgroup(:text => /partial text/)

Search by id:

browser.colgroup(:id => "htmlid")

Search by any arbitrary html attribute:

browser.colgroup(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.colgroup(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


79
# File 'lib/watir-classic/supported_elements.rb', line 79

support_element :colgroup

#commandObject

Create an command html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.command(:text => /partial text/)

Search by id:

browser.command(:id => "htmlid")

Search by any arbitrary html attribute:

browser.command(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.command(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


80
# File 'lib/watir-classic/supported_elements.rb', line 80

support_element :command

#dataObject

Create an data html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.data(:text => /partial text/)

Search by id:

browser.data(:id => "htmlid")

Search by any arbitrary html attribute:

browser.data(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.data(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


81
# File 'lib/watir-classic/supported_elements.rb', line 81

support_element :data

#datalistObject

Create an datalist html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.datalist(:text => /partial text/)

Search by id:

browser.datalist(:id => "htmlid")

Search by any arbitrary html attribute:

browser.datalist(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.datalist(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


82
# File 'lib/watir-classic/supported_elements.rb', line 82

support_element :datalist

#ddObject

Create an dd html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.dd(:text => /partial text/)

Search by id:

browser.dd(:id => "htmlid")

Search by any arbitrary html attribute:

browser.dd(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.dd(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


83
# File 'lib/watir-classic/supported_elements.rb', line 83

support_element :dd

#delObject

Create an del html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.del(:text => /partial text/)

Search by id:

browser.del(:id => "htmlid")

Search by any arbitrary html attribute:

browser.del(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.del(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


84
# File 'lib/watir-classic/supported_elements.rb', line 84

support_element :del

#detailsObject

Create an details html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.details(:text => /partial text/)

Search by id:

browser.details(:id => "htmlid")

Search by any arbitrary html attribute:

browser.details(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.details(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


85
# File 'lib/watir-classic/supported_elements.rb', line 85

support_element :details, :plural => :detailses

#dfnObject

Create an dfn html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.dfn(:text => /partial text/)

Search by id:

browser.dfn(:id => "htmlid")

Search by any arbitrary html attribute:

browser.dfn(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.dfn(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


86
# File 'lib/watir-classic/supported_elements.rb', line 86

support_element :dfn

#divObject

Create an div html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.div(:text => /partial text/)

Search by id:

browser.div(:id => "htmlid")

Search by any arbitrary html attribute:

browser.div(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.div(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


87
# File 'lib/watir-classic/supported_elements.rb', line 87

support_element :div

#dlObject

Create an dl html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.dl(:text => /partial text/)

Search by id:

browser.dl(:id => "htmlid")

Search by any arbitrary html attribute:

browser.dl(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.dl(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


88
# File 'lib/watir-classic/supported_elements.rb', line 88

support_element :dl

#dtObject

Create an dt html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.dt(:text => /partial text/)

Search by id:

browser.dt(:id => "htmlid")

Search by any arbitrary html attribute:

browser.dt(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.dt(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


89
# File 'lib/watir-classic/supported_elements.rb', line 89

support_element :dt

#elementObject

Create an element html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.element(:text => /partial text/)

Search by id:

browser.element(:id => "htmlid")

Search by any arbitrary html attribute:

browser.element(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.element(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


90
# File 'lib/watir-classic/supported_elements.rb', line 90

support_element :element, :tag_name => "*", :class => :HTMLElement

#emObject

Create an em html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.em(:text => /partial text/)

Search by id:

browser.em(:id => "htmlid")

Search by any arbitrary html attribute:

browser.em(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.em(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


91
# File 'lib/watir-classic/supported_elements.rb', line 91

support_element :em

#embedObject

Create an embed html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.embed(:text => /partial text/)

Search by id:

browser.embed(:id => "htmlid")

Search by any arbitrary html attribute:

browser.embed(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.embed(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


92
# File 'lib/watir-classic/supported_elements.rb', line 92

support_element :embed

#fieldsetObject Also known as: field_set

Create an fieldset html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.fieldset(:text => /partial text/)

Search by id:

browser.fieldset(:id => "htmlid")

Search by any arbitrary html attribute:

browser.fieldset(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.fieldset(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


93
# File 'lib/watir-classic/supported_elements.rb', line 93

support_element :fieldset, :class => :FieldSet

#figcaptionObject

Create an figcaption html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.figcaption(:text => /partial text/)

Search by id:

browser.figcaption(:id => "htmlid")

Search by any arbitrary html attribute:

browser.figcaption(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.figcaption(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


96
# File 'lib/watir-classic/supported_elements.rb', line 96

support_element :figcaption

#figureObject

Create an figure html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.figure(:text => /partial text/)

Search by id:

browser.figure(:id => "htmlid")

Search by any arbitrary html attribute:

browser.figure(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.figure(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


97
# File 'lib/watir-classic/supported_elements.rb', line 97

support_element :figure

#file_fieldObject

Create an file_field html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.file_field(:text => /partial text/)

Search by id:

browser.file_field(:id => "htmlid")

Search by any arbitrary html attribute:

browser.file_field(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.file_field(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


98
# File 'lib/watir-classic/supported_elements.rb', line 98

support_element :file_field, :tag_name => :file, :class => :FileField, :super_collection => :InputElement

#fontObject

Create an font html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.font(:text => /partial text/)

Search by id:

browser.font(:id => "htmlid")

Search by any arbitrary html attribute:

browser.font(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.font(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


99
# File 'lib/watir-classic/supported_elements.rb', line 99

support_element :font

Create an footer html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.footer(:text => /partial text/)

Search by id:

browser.footer(:id => "htmlid")

Search by any arbitrary html attribute:

browser.footer(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.footer(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


100
# File 'lib/watir-classic/supported_elements.rb', line 100

support_element :footer

#formObject

Create an form html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.form(:text => /partial text/)

Search by id:

browser.form(:id => "htmlid")

Search by any arbitrary html attribute:

browser.form(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.form(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


101
# File 'lib/watir-classic/supported_elements.rb', line 101

support_element :form

#frameObject Also known as: iframe

Create an frame html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.frame(:text => /partial text/)

Search by id:

browser.frame(:id => "htmlid")

Search by any arbitrary html attribute:

browser.frame(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.frame(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


102
# File 'lib/watir-classic/supported_elements.rb', line 102

support_element :frame, :tag_name => [:frame, :iframe]

#framesetObject

Create an frameset html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.frameset(:text => /partial text/)

Search by id:

browser.frameset(:id => "htmlid")

Search by any arbitrary html attribute:

browser.frameset(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.frameset(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


105
# File 'lib/watir-classic/supported_elements.rb', line 105

support_element :frameset

#h1Object

Create an h1 html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.h1(:text => /partial text/)

Search by id:

browser.h1(:id => "htmlid")

Search by any arbitrary html attribute:

browser.h1(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.h1(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


106
# File 'lib/watir-classic/supported_elements.rb', line 106

support_element :h1

#h2Object

Create an h2 html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.h2(:text => /partial text/)

Search by id:

browser.h2(:id => "htmlid")

Search by any arbitrary html attribute:

browser.h2(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.h2(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


107
# File 'lib/watir-classic/supported_elements.rb', line 107

support_element :h2

#h3Object

Create an h3 html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.h3(:text => /partial text/)

Search by id:

browser.h3(:id => "htmlid")

Search by any arbitrary html attribute:

browser.h3(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.h3(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


108
# File 'lib/watir-classic/supported_elements.rb', line 108

support_element :h3

#h4Object

Create an h4 html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.h4(:text => /partial text/)

Search by id:

browser.h4(:id => "htmlid")

Search by any arbitrary html attribute:

browser.h4(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.h4(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


109
# File 'lib/watir-classic/supported_elements.rb', line 109

support_element :h4

#h5Object

Create an h5 html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.h5(:text => /partial text/)

Search by id:

browser.h5(:id => "htmlid")

Search by any arbitrary html attribute:

browser.h5(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.h5(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


110
# File 'lib/watir-classic/supported_elements.rb', line 110

support_element :h5

#h6Object

Create an h6 html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.h6(:text => /partial text/)

Search by id:

browser.h6(:id => "htmlid")

Search by any arbitrary html attribute:

browser.h6(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.h6(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


111
# File 'lib/watir-classic/supported_elements.rb', line 111

support_element :h6

#headObject

Create an head html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.head(:text => /partial text/)

Search by id:

browser.head(:id => "htmlid")

Search by any arbitrary html attribute:

browser.head(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.head(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


112
# File 'lib/watir-classic/supported_elements.rb', line 112

support_element :head

#headerObject

Create an header html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.header(:text => /partial text/)

Search by id:

browser.header(:id => "htmlid")

Search by any arbitrary html attribute:

browser.header(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.header(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


113
# File 'lib/watir-classic/supported_elements.rb', line 113

support_element :header

#hgroupObject

Create an hgroup html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.hgroup(:text => /partial text/)

Search by id:

browser.hgroup(:id => "htmlid")

Search by any arbitrary html attribute:

browser.hgroup(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.hgroup(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


114
# File 'lib/watir-classic/supported_elements.rb', line 114

support_element :hgroup

#hiddenObject

Create an hidden html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.hidden(:text => /partial text/)

Search by id:

browser.hidden(:id => "htmlid")

Search by any arbitrary html attribute:

browser.hidden(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.hidden(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


115
# File 'lib/watir-classic/supported_elements.rb', line 115

support_element :hidden, :super_class => :TextField, :super_collection => :InputElement

#hrObject

Create an hr html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.hr(:text => /partial text/)

Search by id:

browser.hr(:id => "htmlid")

Search by any arbitrary html attribute:

browser.hr(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.hr(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


116
# File 'lib/watir-classic/supported_elements.rb', line 116

support_element :hr

#iObject

Create an i html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.i(:text => /partial text/)

Search by id:

browser.i(:id => "htmlid")

Search by any arbitrary html attribute:

browser.i(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.i(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


117
# File 'lib/watir-classic/supported_elements.rb', line 117

support_element :i

#imgObject Also known as: image

Create an img html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.img(:text => /partial text/)

Search by id:

browser.img(:id => "htmlid")

Search by any arbitrary html attribute:

browser.img(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.img(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


118
# File 'lib/watir-classic/supported_elements.rb', line 118

support_element :img, :class => :Image

#inputObject

Create an input html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.input(:text => /partial text/)

Search by id:

browser.input(:id => "htmlid")

Search by any arbitrary html attribute:

browser.input(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.input(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


121
# File 'lib/watir-classic/supported_elements.rb', line 121

support_element :input, :super_class => :InputElement

#insObject

Create an ins html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.ins(:text => /partial text/)

Search by id:

browser.ins(:id => "htmlid")

Search by any arbitrary html attribute:

browser.ins(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.ins(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


122
# File 'lib/watir-classic/supported_elements.rb', line 122

support_element :ins, :plural => :inses

#kbdObject

Create an kbd html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.kbd(:text => /partial text/)

Search by id:

browser.kbd(:id => "htmlid")

Search by any arbitrary html attribute:

browser.kbd(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.kbd(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


123
# File 'lib/watir-classic/supported_elements.rb', line 123

support_element :kbd

#keygenObject

Create an keygen html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.keygen(:text => /partial text/)

Search by id:

browser.keygen(:id => "htmlid")

Search by any arbitrary html attribute:

browser.keygen(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.keygen(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


124
# File 'lib/watir-classic/supported_elements.rb', line 124

support_element :keygen

#labelObject

Create an label html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.label(:text => /partial text/)

Search by id:

browser.label(:id => "htmlid")

Search by any arbitrary html attribute:

browser.label(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.label(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


125
# File 'lib/watir-classic/supported_elements.rb', line 125

support_element :label

#legendObject

Create an legend html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.legend(:text => /partial text/)

Search by id:

browser.legend(:id => "htmlid")

Search by any arbitrary html attribute:

browser.legend(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.legend(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


126
# File 'lib/watir-classic/supported_elements.rb', line 126

support_element :legend

#liObject

Create an li html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.li(:text => /partial text/)

Search by id:

browser.li(:id => "htmlid")

Search by any arbitrary html attribute:

browser.li(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.li(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


127
# File 'lib/watir-classic/supported_elements.rb', line 127

support_element :li

#mapObject

Create an map html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.map(:text => /partial text/)

Search by id:

browser.map(:id => "htmlid")

Search by any arbitrary html attribute:

browser.map(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.map(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


128
# File 'lib/watir-classic/supported_elements.rb', line 128

support_element :map

#markObject

Create an mark html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.mark(:text => /partial text/)

Search by id:

browser.mark(:id => "htmlid")

Search by any arbitrary html attribute:

browser.mark(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.mark(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


129
# File 'lib/watir-classic/supported_elements.rb', line 129

support_element :mark

Create an menu html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.menu(:text => /partial text/)

Search by id:

browser.menu(:id => "htmlid")

Search by any arbitrary html attribute:

browser.menu(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.menu(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


130
# File 'lib/watir-classic/supported_elements.rb', line 130

support_element :menu

#metaObject

Create an meta html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.meta(:text => /partial text/)

Search by id:

browser.meta(:id => "htmlid")

Search by any arbitrary html attribute:

browser.meta(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.meta(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


131
# File 'lib/watir-classic/supported_elements.rb', line 131

support_element :meta

#meterObject

Create an meter html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.meter(:text => /partial text/)

Search by id:

browser.meter(:id => "htmlid")

Search by any arbitrary html attribute:

browser.meter(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.meter(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


132
# File 'lib/watir-classic/supported_elements.rb', line 132

support_element :meter

Returns modal dialog instance.

Returns:



40
41
42
# File 'lib/watir-classic/container.rb', line 40

def modal_dialog
  ModalDialog.new(self)
end

Create an nav html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.nav(:text => /partial text/)

Search by id:

browser.nav(:id => "htmlid")

Search by any arbitrary html attribute:

browser.nav(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.nav(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


133
# File 'lib/watir-classic/supported_elements.rb', line 133

support_element :nav

#noscriptObject

Create an noscript html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.noscript(:text => /partial text/)

Search by id:

browser.noscript(:id => "htmlid")

Search by any arbitrary html attribute:

browser.noscript(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.noscript(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


134
# File 'lib/watir-classic/supported_elements.rb', line 134

support_element :noscript

#objectObject

Create an object html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.object(:text => /partial text/)

Search by id:

browser.object(:id => "htmlid")

Search by any arbitrary html attribute:

browser.object(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.object(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


135
# File 'lib/watir-classic/supported_elements.rb', line 135

support_element :object

#olObject

Create an ol html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.ol(:text => /partial text/)

Search by id:

browser.ol(:id => "htmlid")

Search by any arbitrary html attribute:

browser.ol(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.ol(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


136
# File 'lib/watir-classic/supported_elements.rb', line 136

support_element :ol

#optgroupObject

Create an optgroup html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.optgroup(:text => /partial text/)

Search by id:

browser.optgroup(:id => "htmlid")

Search by any arbitrary html attribute:

browser.optgroup(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.optgroup(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


137
# File 'lib/watir-classic/supported_elements.rb', line 137

support_element :optgroup

#optionObject

Create an option html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.option(:text => /partial text/)

Search by id:

browser.option(:id => "htmlid")

Search by any arbitrary html attribute:

browser.option(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.option(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


138
# File 'lib/watir-classic/supported_elements.rb', line 138

support_element :option

#outputObject

Create an output html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.output(:text => /partial text/)

Search by id:

browser.output(:id => "htmlid")

Search by any arbitrary html attribute:

browser.output(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.output(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


139
# File 'lib/watir-classic/supported_elements.rb', line 139

support_element :output

#pObject

Create an p html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.p(:text => /partial text/)

Search by id:

browser.p(:id => "htmlid")

Search by any arbitrary html attribute:

browser.p(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.p(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


140
# File 'lib/watir-classic/supported_elements.rb', line 140

support_element :p

#paramObject

Create an param html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.param(:text => /partial text/)

Search by id:

browser.param(:id => "htmlid")

Search by any arbitrary html attribute:

browser.param(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.param(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


141
# File 'lib/watir-classic/supported_elements.rb', line 141

support_element :param

#preObject

Create an pre html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.pre(:text => /partial text/)

Search by id:

browser.pre(:id => "htmlid")

Search by any arbitrary html attribute:

browser.pre(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.pre(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


142
# File 'lib/watir-classic/supported_elements.rb', line 142

support_element :pre

#progressObject

Create an progress html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.progress(:text => /partial text/)

Search by id:

browser.progress(:id => "htmlid")

Search by any arbitrary html attribute:

browser.progress(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.progress(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


143
# File 'lib/watir-classic/supported_elements.rb', line 143

support_element :progress, :plural => :progresses

#qObject

Create an q html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.q(:text => /partial text/)

Search by id:

browser.q(:id => "htmlid")

Search by any arbitrary html attribute:

browser.q(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.q(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


144
# File 'lib/watir-classic/supported_elements.rb', line 144

support_element :q

#radioObject

Create an radio html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.radio(:text => /partial text/)

Search by id:

browser.radio(:id => "htmlid")

Search by any arbitrary html attribute:

browser.radio(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.radio(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


145
# File 'lib/watir-classic/supported_elements.rb', line 145

support_element :radio, :super_class => :InputElement

#rpObject

Create an rp html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.rp(:text => /partial text/)

Search by id:

browser.rp(:id => "htmlid")

Search by any arbitrary html attribute:

browser.rp(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.rp(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


146
# File 'lib/watir-classic/supported_elements.rb', line 146

support_element :rp

#rtObject

Create an rt html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.rt(:text => /partial text/)

Search by id:

browser.rt(:id => "htmlid")

Search by any arbitrary html attribute:

browser.rt(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.rt(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


147
# File 'lib/watir-classic/supported_elements.rb', line 147

support_element :rt

#rubyObject

Create an ruby html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.ruby(:text => /partial text/)

Search by id:

browser.ruby(:id => "htmlid")

Search by any arbitrary html attribute:

browser.ruby(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.ruby(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


148
# File 'lib/watir-classic/supported_elements.rb', line 148

support_element :ruby, :plural => :rubies

#sObject

Create an s html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.s(:text => /partial text/)

Search by id:

browser.s(:id => "htmlid")

Search by any arbitrary html attribute:

browser.s(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.s(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


149
# File 'lib/watir-classic/supported_elements.rb', line 149

support_element :s

#sampObject

Create an samp html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.samp(:text => /partial text/)

Search by id:

browser.samp(:id => "htmlid")

Search by any arbitrary html attribute:

browser.samp(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.samp(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


150
# File 'lib/watir-classic/supported_elements.rb', line 150

support_element :samp

#scriptObject

Create an script html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.script(:text => /partial text/)

Search by id:

browser.script(:id => "htmlid")

Search by any arbitrary html attribute:

browser.script(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.script(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


151
# File 'lib/watir-classic/supported_elements.rb', line 151

support_element :script

#sectionObject

Create an section html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.section(:text => /partial text/)

Search by id:

browser.section(:id => "htmlid")

Search by any arbitrary html attribute:

browser.section(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.section(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


152
# File 'lib/watir-classic/supported_elements.rb', line 152

support_element :section

#selectObject Also known as: select_list

Create an select html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.select(:text => /partial text/)

Search by id:

browser.select(:id => "htmlid")

Search by any arbitrary html attribute:

browser.select(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.select(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


153
# File 'lib/watir-classic/supported_elements.rb', line 153

support_element :select, :class => :SelectList, :super_class => :InputElement

#smallObject

Create an small html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.small(:text => /partial text/)

Search by id:

browser.small(:id => "htmlid")

Search by any arbitrary html attribute:

browser.small(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.small(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


156
# File 'lib/watir-classic/supported_elements.rb', line 156

support_element :small

#sourceObject

Create an source html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.source(:text => /partial text/)

Search by id:

browser.source(:id => "htmlid")

Search by any arbitrary html attribute:

browser.source(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.source(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


157
# File 'lib/watir-classic/supported_elements.rb', line 157

support_element :source

#spanObject

Create an span html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.span(:text => /partial text/)

Search by id:

browser.span(:id => "htmlid")

Search by any arbitrary html attribute:

browser.span(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.span(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


158
# File 'lib/watir-classic/supported_elements.rb', line 158

support_element :span

#strongObject

Create an strong html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.strong(:text => /partial text/)

Search by id:

browser.strong(:id => "htmlid")

Search by any arbitrary html attribute:

browser.strong(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.strong(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


159
# File 'lib/watir-classic/supported_elements.rb', line 159

support_element :strong

#styleObject

Create an style html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.style(:text => /partial text/)

Search by id:

browser.style(:id => "htmlid")

Search by any arbitrary html attribute:

browser.style(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.style(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


160
# File 'lib/watir-classic/supported_elements.rb', line 160

support_element :style

#subObject

Create an sub html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.sub(:text => /partial text/)

Search by id:

browser.sub(:id => "htmlid")

Search by any arbitrary html attribute:

browser.sub(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.sub(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


161
# File 'lib/watir-classic/supported_elements.rb', line 161

support_element :sub

#summaryObject

Create an summary html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.summary(:text => /partial text/)

Search by id:

browser.summary(:id => "htmlid")

Search by any arbitrary html attribute:

browser.summary(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.summary(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


162
# File 'lib/watir-classic/supported_elements.rb', line 162

support_element :summary, :plural => :summaries

#supObject

Create an sup html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.sup(:text => /partial text/)

Search by id:

browser.sup(:id => "htmlid")

Search by any arbitrary html attribute:

browser.sup(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.sup(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


163
# File 'lib/watir-classic/supported_elements.rb', line 163

support_element :sup

#tableObject

Create an table html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.table(:text => /partial text/)

Search by id:

browser.table(:id => "htmlid")

Search by any arbitrary html attribute:

browser.table(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.table(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


164
# File 'lib/watir-classic/supported_elements.rb', line 164

support_element :table

#tbodyObject

Create an tbody html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.tbody(:text => /partial text/)

Search by id:

browser.tbody(:id => "htmlid")

Search by any arbitrary html attribute:

browser.tbody(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.tbody(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


165
# File 'lib/watir-classic/supported_elements.rb', line 165

support_element :tbody, :class => :TableSection

#tdObject

Create an td html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.td(:text => /partial text/)

Search by id:

browser.td(:id => "htmlid")

Search by any arbitrary html attribute:

browser.td(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.td(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


166
# File 'lib/watir-classic/supported_elements.rb', line 166

support_element :td, :tag_name => [:th, :td], :class => :TableCell

#text_fieldObject

Create an text_field html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.text_field(:text => /partial text/)

Search by id:

browser.text_field(:id => "htmlid")

Search by any arbitrary html attribute:

browser.text_field(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.text_field(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


167
# File 'lib/watir-classic/supported_elements.rb', line 167

support_element :text_field, :tag_name => [:text, :password, :textarea, :number, :email, :url, :search, :tel], :class => :TextField, :super_class => :InputElement

#textareaObject

Create an textarea html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.textarea(:text => /partial text/)

Search by id:

browser.textarea(:id => "htmlid")

Search by any arbitrary html attribute:

browser.textarea(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.textarea(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


168
# File 'lib/watir-classic/supported_elements.rb', line 168

support_element :textarea, :class => :TextArea, :super_class => :TextField, :super_collection => :InputElement

#tfootObject

Create an tfoot html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.tfoot(:text => /partial text/)

Search by id:

browser.tfoot(:id => "htmlid")

Search by any arbitrary html attribute:

browser.tfoot(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.tfoot(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


169
# File 'lib/watir-classic/supported_elements.rb', line 169

support_element :tfoot, :class => :TableSection

#thObject

Create an th html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.th(:text => /partial text/)

Search by id:

browser.th(:id => "htmlid")

Search by any arbitrary html attribute:

browser.th(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.th(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


170
# File 'lib/watir-classic/supported_elements.rb', line 170

support_element :th

#theadObject

Create an thead html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.thead(:text => /partial text/)

Search by id:

browser.thead(:id => "htmlid")

Search by any arbitrary html attribute:

browser.thead(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.thead(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


171
# File 'lib/watir-classic/supported_elements.rb', line 171

support_element :thead, :class => :TableSection

#timeObject

Create an time html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.time(:text => /partial text/)

Search by id:

browser.time(:id => "htmlid")

Search by any arbitrary html attribute:

browser.time(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.time(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


172
# File 'lib/watir-classic/supported_elements.rb', line 172

support_element :time

#titleObject

Create an title html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.title(:text => /partial text/)

Search by id:

browser.title(:id => "htmlid")

Search by any arbitrary html attribute:

browser.title(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.title(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


173
# File 'lib/watir-classic/supported_elements.rb', line 173

support_element :title

#trObject

Create an tr html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.tr(:text => /partial text/)

Search by id:

browser.tr(:id => "htmlid")

Search by any arbitrary html attribute:

browser.tr(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.tr(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


174
# File 'lib/watir-classic/supported_elements.rb', line 174

support_element :tr, :class => :TableRow

#trackObject

Create an track html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.track(:text => /partial text/)

Search by id:

browser.track(:id => "htmlid")

Search by any arbitrary html attribute:

browser.track(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.track(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


175
# File 'lib/watir-classic/supported_elements.rb', line 175

support_element :track

#uObject

Create an u html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.u(:text => /partial text/)

Search by id:

browser.u(:id => "htmlid")

Search by any arbitrary html attribute:

browser.u(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.u(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


176
# File 'lib/watir-classic/supported_elements.rb', line 176

support_element :u

#ulObject

Create an ul html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.ul(:text => /partial text/)

Search by id:

browser.ul(:id => "htmlid")

Search by any arbitrary html attribute:

browser.ul(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.ul(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


177
# File 'lib/watir-classic/supported_elements.rb', line 177

support_element :ul

#varObject

Create an var html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.var(:text => /partial text/)

Search by id:

browser.var(:id => "htmlid")

Search by any arbitrary html attribute:

browser.var(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.var(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


178
# File 'lib/watir-classic/supported_elements.rb', line 178

support_element :var

#videoObject

Create an video html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.video(:text => /partial text/)

Search by id:

browser.video(:id => "htmlid")

Search by any arbitrary html attribute:

browser.video(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.video(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


179
# File 'lib/watir-classic/supported_elements.rb', line 179

support_element :video

#wbrObject

Create an wbr html element instance.

Elements can be searched by using different locators.

Examples:

Search by partial text:

browser.wbr(:text => /partial text/)

Search by id:

browser.wbr(:id => "htmlid")

Search by any arbitrary html attribute:

browser.wbr(:foo => "value-of-foo-attribute")

Search by multiple attributes, all provided locators should evaluate to true - only then element is considered to be found:

browser.wbr(:text => "some text", :class => "css class")

It is also possible to search for multiple elements of the same type like this:

browser.divs(:class => "foo") # => instance of Watir::DivCollection


180
# File 'lib/watir-classic/supported_elements.rb', line 180

support_element :wbr