To click on the link:
$browser.a(:class => "cancel").click
or
$browser.a(:text => "Cancel").click

To click on the button:
$browser.button(:class => "submit").click
or
$browser.button(:text => "Save").click


On Tue, May 26, 2015 at 7:42 PM, rocky <[email protected]> wrote:

> Hi All,
>
> i am unable to click link using below html attribute,
>
> <div class="button-container">
> <button class="submit">Save</button>
> <a class="cancel" href="/customers">Cancel</a>
> </div>
>
>
> code:
>
> $browser.button(:class,cancel).click
>
>
> Kindly help me...
>
> Thanks and regards,
> Siddu.
>
> --
> --
> 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/d/optout.
>



-- 
Regards,
Anisha Narang

-- 
-- 
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/d/optout.

Reply via email to