Ankita@Adslot
unread,May 23, 2013, 1:46:33 AM5/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to watir-...@googlegroups.com
Hi
I have following code
<div>
<a class="btn btn-inverse" onclick="return confirm("Are you sure?");" href="/siteadmin/change-user/6">Login</a>
</div>
Now when you click on this login link, it opens a alert JS message having two buttons OK and Cancel.. Clicking OK will log you in.
I added the code
browser.element(:xpath,"//div/a[contains(.,'Login')]).when_present.click
$b.alert.ok
This code does works fine on firefox, but if I want to use it with phantom.js, seems like it does not click the login button.
Any help would be highly appreciated.