Method: Webdrone::XPath#link
- Defined in:
- lib/webdrone/xpath.rb
#link(locator) ⇒ Object
Match an a link element.
15 16 17 18 19 |
# File 'lib/webdrone/xpath.rb', line 15 def link(locator) locator = locator.to_s link = descendant(:a)[attr(:href)] link[attr(:id).equals(locator) | string.n.is(locator) | attr(:title).is(locator) | descendant(:img)[attr(:alt).is(locator)]] end |