Module: Watir

Defined in:
lib/watir-webdriver/elements/svg_elements.rb,
lib/watir-webdriver.rb,
lib/watir-webdriver/wait.rb,
lib/watir-webdriver/alert.rb,
lib/watir-webdriver/atoms.rb,
lib/watir-webdriver/window.rb,
lib/watir-webdriver/aliases.rb,
lib/watir-webdriver/browser.rb,
lib/watir-webdriver/cookies.rb,
lib/watir-webdriver/version.rb,
lib/watir-webdriver/container.rb,
lib/watir-webdriver/exception.rb,
lib/watir-webdriver/has_window.rb,
lib/watir-webdriver/screenshot.rb,
lib/watir-webdriver/wait/timer.rb,
lib/watir-webdriver/after_hooks.rb,
lib/watir-webdriver/elements/row.rb,
lib/watir-webdriver/elements/area.rb,
lib/watir-webdriver/elements/cell.rb,
lib/watir-webdriver/elements/font.rb,
lib/watir-webdriver/elements/form.rb,
lib/watir-webdriver/elements/link.rb,
lib/watir-webdriver/row_container.rb,
lib/watir-webdriver/user_editable.rb,
lib/watir-webdriver/xpath_support.rb,
lib/watir-webdriver/cell_container.rb,
lib/watir-webdriver/elements/dlist.rb,
lib/watir-webdriver/elements/image.rb,
lib/watir-webdriver/elements/input.rb,
lib/watir-webdriver/elements/radio.rb,
lib/watir-webdriver/elements/table.rb,
lib/watir-webdriver/elements/button.rb,
lib/watir-webdriver/elements/hidden.rb,
lib/watir-webdriver/elements/iframe.rb,
lib/watir-webdriver/elements/option.rb,
lib/watir-webdriver/elements/select.rb,
lib/watir-webdriver/attribute_helper.rb,
lib/watir-webdriver/elements/element.rb,
lib/watir-webdriver/elements/checkbox.rb,
lib/watir-webdriver/extensions/alerts.rb,
lib/watir-webdriver/element_collection.rb,
lib/watir-webdriver/elements/table_row.rb,
lib/watir-webdriver/elements/text_area.rb,
lib/watir-webdriver/elements/file_field.rb,
lib/watir-webdriver/elements/table_cell.rb,
lib/watir-webdriver/elements/text_field.rb,
lib/watir-webdriver/extensions/nokogiri.rb,
lib/watir-webdriver/generator/base/util.rb,
lib/watir-webdriver/locators/row/locator.rb,
lib/watir-webdriver/generator/svg/visitor.rb,
lib/watir-webdriver/locators/cell/locator.rb,
lib/watir-webdriver/elements/html_elements.rb,
lib/watir-webdriver/elements/table_section.rb,
lib/watir-webdriver/extensions/select_text.rb,
lib/watir-webdriver/generator/base/visitor.rb,
lib/watir-webdriver/generator/html/visitor.rb,
lib/watir-webdriver/generator/svg/generator.rb,
lib/watir-webdriver/locators/button/locator.rb,
lib/watir-webdriver/generator/base/generator.rb,
lib/watir-webdriver/generator/html/generator.rb,
lib/watir-webdriver/locators/element/locator.rb,
lib/watir-webdriver/generator/base/idl_sorter.rb,
lib/watir-webdriver/locators/button/validator.rb,
lib/watir-webdriver/locators/element/validator.rb,
lib/watir-webdriver/locators/text_area/locator.rb,
lib/watir-webdriver/locators/text_field/locator.rb,
lib/watir-webdriver/generator/svg/spec_extractor.rb,
lib/watir-webdriver/generator/base/spec_extractor.rb,
lib/watir-webdriver/generator/html/spec_extractor.rb,
lib/watir-webdriver/locators/row/selector_builder.rb,
lib/watir-webdriver/locators/text_field/validator.rb,
lib/watir-webdriver/locators/cell/selector_builder.rb,
lib/watir-webdriver/locators/button/selector_builder.rb,
lib/watir-webdriver/locators/element/selector_builder.rb,
lib/watir-webdriver/locators/text_area/selector_builder.rb,
lib/watir-webdriver/locators/text_field/selector_builder.rb,
lib/watir-webdriver/locators/element/selector_builder/css.rb,
lib/watir-webdriver/locators/button/selector_builder/xpath.rb,
lib/watir-webdriver/locators/element/selector_builder/xpath.rb,
lib/watir-webdriver/locators/text_field/selector_builder/xpath.rb

Overview

Autogenerated from HTML specification. Edits may be lost.

Defined Under Namespace

Modules: AlertHelper, Atoms, AttributeHelper, CellContainer, Container, EventuallyPresent, Exception, Generator, HasWindow, Locators, RowContainer, UserEditable, Wait, Waitable, XpathSupport Classes: AfterHooks, Alert, Anchor, AnchorCollection, Animate, AnimateCollection, AnimateMotion, AnimateMotionCollection, AnimateTransform, AnimateTransformCollection, Animation, AnimationCollection, Applet, AppletCollection, Area, AreaCollection, Audio, AudioCollection, BR, BRCollection, Base, BaseCollection, BaseDecorator, Body, BodyCollection, Browser, Button, ButtonCollection, Canvas, CanvasCollection, Cell, CellCollection, CheckBox, CheckBoxCollection, Circle, CircleCollection, Cookies, Cursor, CursorCollection, DList, DListCollection, Data, DataCollection, DataList, DataListCollection, Defs, DefsCollection, Desc, DescCollection, Details, DetailsCollection, Dialog, DialogCollection, Directory, DirectoryCollection, Div, DivCollection, Element, ElementCollection, Ellipse, EllipseCollection, Embed, EmbedCollection, FieldSet, FieldSetCollection, FileField, FileFieldCollection, Font, FontCollection, ForeignObject, ForeignObjectCollection, Form, FormCollection, Frame, FrameCollection, FrameSet, FrameSetCollection, FramedDriver, G, GCollection, Geometry, GeometryCollection, Gradient, GradientCollection, Graphics, GraphicsCollection, HR, HRCollection, HTMLElement, HTMLElementCollection, Head, HeadCollection, Heading, HeadingCollection, Hidden, HiddenCollection, Html, HtmlCollection, IFrame, IFrameCollection, Image, ImageCollection, Input, InputCollection, Keygen, KeygenCollection, LI, LICollection, Label, LabelCollection, Legend, LegendCollection, Line, LineCollection, LinearGradient, LinearGradientCollection, MPath, MPathCollection, Map, MapCollection, Marker, MarkerCollection, Marquee, MarqueeCollection, Media, MediaCollection, Menu, MenuCollection, MenuItem, MenuItemCollection, MeshGradient, MeshGradientCollection, MeshPatch, MeshPatchCollection, MeshRow, MeshRowCollection, Meta, MetaCollection, Metadata, MetadataCollection, Meter, MeterCollection, Mod, ModCollection, OList, OListCollection, Object, ObjectCollection, OptGroup, OptGroupCollection, Option, OptionCollection, Output, OutputCollection, Paragraph, ParagraphCollection, Param, ParamCollection, Path, PathCollection, Pattern, PatternCollection, Picture, PictureCollection, Polygon, PolygonCollection, Polyline, PolylineCollection, Pre, PreCollection, Progress, ProgressCollection, Quote, QuoteCollection, RadialGradient, RadialGradientCollection, Radio, RadioCollection, Rect, RectCollection, Row, RowCollection, SVG, SVGCollection, SVGElement, SVGElementCollection, Screenshot, Script, ScriptCollection, Select, SelectCollection, Set, SetCollection, Source, SourceCollection, Span, SpanCollection, Stop, StopCollection, Style, StyleCollection, Switch, SwitchCollection, Symbol, SymbolCollection, TSpan, TSpanCollection, Table, TableCaption, TableCaptionCollection, TableCell, TableCellCollection, TableCol, TableColCollection, TableCollection, TableDataCell, TableDataCellCollection, TableHeaderCell, TableHeaderCellCollection, TableRow, TableRowCollection, TableSection, TableSectionCollection, Template, TemplateCollection, TextArea, TextAreaCollection, TextContent, TextContentCollection, TextField, TextFieldCollection, TextPath, TextPathCollection, TextPositioning, TextPositioningCollection, Time, TimeCollection, Title, TitleCollection, Track, TrackCollection, UList, UListCollection, Unknown, UnknownCollection, Use, UseCollection, Video, VideoCollection, View, ViewCollection, WhenEnabledDecorator, WhenPresentDecorator, Window

Constant Summary collapse

VERSION =
'0.9.9'

Class Method Summary collapse

Class Method Details

.always_locate=(bool) ⇒ Object

Whether or not Watir should cache element references or always re-locate an Element on use. Defaults to true.



30
31
32
# File 'lib/watir-webdriver.rb', line 30

def always_locate=(bool)
  @always_locate = bool
end

.always_locate?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/watir-webdriver.rb', line 21

def always_locate?
  @always_locate
end

.default_timeoutObject



34
35
36
# File 'lib/watir-webdriver.rb', line 34

def default_timeout
  @default_timeout ||= 30
end

.default_timeout=(value) ⇒ Object

Default wait time for wait methods.



42
43
44
# File 'lib/watir-webdriver.rb', line 42

def default_timeout=(value)
  @default_timeout = value
end

.element_class_for(tag_name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



84
85
86
# File 'lib/watir-webdriver.rb', line 84

def element_class_for(tag_name)
  tag_to_class[tag_name.to_sym] || HTMLElement
end

.locator_namespaceObject



59
60
61
# File 'lib/watir-webdriver.rb', line 59

def locator_namespace
  @locator_namespace ||= Watir::Locators
end

.locator_namespace=(mod) ⇒ Object

Whether the locators should be used from a different namespace. Defaults to Watir::Locators.



68
69
70
# File 'lib/watir-webdriver.rb', line 68

def locator_namespace=(mod)
  @locator_namespace = mod
end

.prefer_css=(bool) ⇒ Object

Whether or not Watir should prefer CSS when translating the Watir selectors to WebDriver. Defaults to false.



55
56
57
# File 'lib/watir-webdriver.rb', line 55

def prefer_css=(bool)
  @prefer_css = bool
end

.prefer_css?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/watir-webdriver.rb', line 46

def prefer_css?
  @prefer_css
end

.tag_to_classObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



76
77
78
# File 'lib/watir-webdriver.rb', line 76

def tag_to_class
  @tag_to_class ||= {}
end