Might want to read up on how ghostdriver handles alerts?  There's a lot of 
discussion here:

https://github.com/detro/ghostdriver/issues/20


On Thursday, May 23, 2013 1:46:33 AM UTC-4, Ankita@Adslot wrote:
>
> Hi 
>
> I have following code 
> <div>
>   <a class="btn btn-inverse" onclick="return confirm(&quot;Are you 
> sure?&quot;);" 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.


Reply via email to