Class: Watir::Container::Option

Inherits:
InputElement show all
Defined in:
lib/safariwatir.rb

Constant Summary

Constants inherited from HtmlElement

HtmlElement::OPERATIONS

Instance Attribute Summary

Attributes inherited from HtmlElement

#how, #what

Instance Method Summary collapse

Methods inherited from InputElement

#by_value, #enabled?, #speak

Methods included from Clickable

#click

Methods inherited from HtmlElement

#name, #speak

Instance Method Details

#exists?Boolean Also known as: exist?

Returns:

  • (Boolean)


293
294
295
# File 'lib/safariwatir.rb', line 293

def exists?
  @scripter.option_exists?(self)
end

#operate(&block) ⇒ Object



289
290
291
# File 'lib/safariwatir.rb', line 289

def operate(&block)
  @select_list.operate(&block)
end

#selectObject



283
284
285
286
287
# File 'lib/safariwatir.rb', line 283

def select
  @scripter.highlight(self) do
    select_option
  end
end

#selected?Boolean

Returns:

  • (Boolean)


298
299
300
# File 'lib/safariwatir.rb', line 298

def selected?
  @scripter.option_selected?(self)
end

#tagObject



306
# File 'lib/safariwatir.rb', line 306

def tag; "OPTION"; end

#textObject



302
303
304
# File 'lib/safariwatir.rb', line 302

def text
  @scripter.get_text_for(self)
end