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. -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
