Class: Watir::Image
- Inherits:
-
HTMLElement
- Object
- BaseElement
- HTMLElement
- Watir::Image
- Defined in:
- lib/watir-webdriver/elements/image.rb,
lib/watir-webdriver/elements/generated.rb,
lib/watir-webdriver/elements/generated.rb
Constant Summary
Constants inherited from BaseElement
BaseElement::IGNORED_ATTRIBUTES
Instance Method Summary collapse
- #file_created_date ⇒ Object
- #file_size ⇒ Object
-
#height ⇒ Integer
returns the image’s height in pixels.
- #save(path) ⇒ Object
-
#width ⇒ Integer
returns the image’s width in pixels.
Methods inherited from BaseElement
attribute_list, #attribute_value, attributes, #click, #double_click, #driver, #element, #exists?, #fire_event, #flash, #focus, #html, #initialize, #inspect, #parent, #right_click, #run_checkers, #send_keys, #style, #tag_name, #text, typed_attributes, #value, #visible?
Methods included from Container
Methods included from XpathSupport
#element_by_xpath, #elements_by_xpath
Constructor Details
This class inherits a constructor from Watir::BaseElement
Instance Method Details
#file_created_date ⇒ Object
29 30 31 32 |
# File 'lib/watir-webdriver/elements/image.rb', line 29 def file_created_date assert_exists raise NotImplementedError end |
#file_size ⇒ Object
34 35 36 37 |
# File 'lib/watir-webdriver/elements/image.rb', line 34 def file_size assert_exists raise NotImplementedError end |
#height ⇒ Integer
returns the image’s height in pixels
24 25 26 27 |
# File 'lib/watir-webdriver/elements/image.rb', line 24 def height assert_exists driver.execute_script "return arguments[0].height", @element end |
#save(path) ⇒ Object
39 40 41 42 |
# File 'lib/watir-webdriver/elements/image.rb', line 39 def save(path) assert_exists raise NotImplementedError end |
#width ⇒ Integer
returns the image’s width in pixels
13 14 15 16 |
# File 'lib/watir-webdriver/elements/image.rb', line 13 def width assert_exists driver.execute_script "return arguments[0].width", @element end |