The page object gem automatically creates a method for checking existence - 
see the docs 
http://rubydoc.info/github/cheezy/page-object/master/PageObject/Accessors#link-instance_method.

So for:

link(:signout, :text => 'Sign Out')

There should be able to do:

signout?

- Justin Ko


On Friday, November 2, 2012 4:46:31 AM UTC-4, Željko Filipin wrote:
>
> Try this:
>
> Then /^I should have access to my account$/ do
>   on(LoginPage).signout_element.should exist
> end
>
> Explanation:
>
> on(LoginPage).signout # clicks the link
> on(LoginPage).signout_element # returns the link
>
> More information:
>
> https://github.com/cheezy/page-object/wiki/Elements
>
> Željko
> --
> filipin.eu
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to