Method: XPath::HTML#link
- Defined in:
- lib/xpath/html.rb
#link(locator) ⇒ Object
6 7 8 9 |
# File 'lib/xpath/html.rb', line 6 def link(locator) 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 |