Class: CapybaraPageObject::Image

Inherits:
Node
  • Object
show all
Defined in:
lib/element/image.rb

Instance Attribute Summary

Attributes inherited from Node

#source

Instance Method Summary collapse

Methods inherited from Node

#classes, from_string, #initialize

Methods included from HTML5Data

#data

Methods included from Collections

#forms, #tables

Methods included from Delegators

#all, #find, #text

Constructor Details

This class inherits a constructor from CapybaraPageObject::Node

Instance Method Details

#altObject



11
12
13
# File 'lib/element/image.rb', line 11

def alt
  source[:alt].strip
end

#keyObject



3
4
5
# File 'lib/element/image.rb', line 3

def key
  alt
end

#valueObject



7
8
9
# File 'lib/element/image.rb', line 7

def value
  URI(source[:src])
end