知道如何单击具有以下条件的链接:
<a href="javascript:window.location='/app/exe/add.do?Id=8&val=1&callerURL=details';
我尝试了以下示例的几种变体,但似乎无法使其正常工作。
#$ie.a(:href => "http://app.com/app/exe/add.do?Id=8&val=1&callerURL=details").click
#$ie.link(:xpath,"//a[contains(@href='/app/exe/add.do?Id=8&val=1&callerURL=details')]/").click
#$ie.link(:href => "javascript:window.location='/app/exe/add.do?Id=8&val=1&callerURL=details'").click
#$ie.execute_script(:href => "javascript:window.location='/app/exe/add.do?Id=8&val=1&callerURL=details'").click
$ie.link(:xpath,"//a[contains(@href='/app/exe/add.do?Id=8&val=1&callerURL=details')]/").fire_event('onclick')