lib/watir/link.rb in watir-3.0.0.rc2 vs lib/watir/link.rb in watir-3.0.0.rc3
- old
+ new
@@ -3,23 +3,13 @@
# This class is the means of accessing a link on a page
# Normally a user would not need to create this object as it is returned by the Watir::Container#link method
# many of the methods available to this object are inherited from the Element class
#
class Link < Element
- TAG = "A"
+ attr_ole :type
+ attr_ole :href
- # Returns an initialized instance of a link object
- # * container - an instance of a container
- # * how - symbol - how we access the link
- # * what - what we use to access the link, text, url, index etc
- def initialize(container, how, what)
- set_container container
- @how = how
- @what = what
- super(nil)
- end
-
# if an image is used as part of the link, this will return true
def link_has_image
assert_exists
return true if @o.getElementsByTagName("IMG").length > 0
return false
@@ -48,14 +38,9 @@
assert_exists
r = string_creator
r = r + link_string_creator
return r.join("\n")
end
-
- Watir::Container.module_eval do
- alias_method :a, :link
- alias_method :as, :links
- end
end
end