How can I click a link using it's HTML with Watir
-
12-09-2019 - |
Question
I have a link that looks like this:
<a href="#" onclick="new Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', {asynchronous:true, evalScripts:true}); return false;">add a term</a>
I would like to click it using contract_id=227
.
Solution
browser.link(:html, /contract_id=227/).click
Sources:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow