lib/webdrone/vrfy.rb in webdrone-0.4.0 vs lib/webdrone/vrfy.rb in webdrone-0.5.0

- old
+ new

@@ -14,10 +14,14 @@ def id(text, attr: nil, eq: nil, contains: nil) vrfy @a0.find.id(text), attr: attr, eq: eq, contains: contains end + def css(text, attr: nil, eq: nil, contains: nil) + vrfy @a0.find.css(text), attr: attr, eq: eq, contains: contains + end + def link(text, n: 1, visible: true, attr: nil, eq: nil, contains: nil) vrfy @a0.find.link(text, n: n, visible: visible), attr: attr, eq: eq, contains: contains end def button(text, n: 1, visible: true, attr: nil, eq: nil, contains: nil) @@ -33,10 +37,10 @@ end def xpath(text, n: 1, visible: true, attr: nil, eq: nil, contains: nil) vrfy @a0.find.xpath(text, n: n, visible: visible), attr: attr, eq: eq, contains: contains end - + def vrfy(item, attr: nil, eq: nil, contains: nil) if attr != nil r = item.attribute(attr) == eq if eq != nil r = item.attribute(attr).include? contains if contains != nil elsif eq != nil