Re: [wtr-general] undefined method `exists?' for link (PageObject gem)

2012-11-08 Thread Barry Horgan
Thanks for the suggestions, many ways to skin a cat! Oscar, I understand your point about an element existing but can still be not visible. Interestingly, both 'should_be present' method caused problems: undefined method `present?' for []:Array (NoMethodError) Both "on(LoginPage).signout_eleme

Re: [wtr-general] undefined method `exists?' for link (PageObject gem)

2012-11-02 Thread Justin Ko
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, N

Re: [wtr-general] undefined method `exists?' for link (PageObject gem)

2012-11-02 Thread Željko Filipin
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 -- filip

Re: [wtr-general] undefined method `exists?' for link (PageObject gem)

2012-11-01 Thread Oscar Rieken
this kind of test honestly confuses me I understand you want to check to see if the link exists so why not do that instead of calling a method to check to see if it exists and then checking to see if that method returns true I dont use page_object but I think this is the right syntax (on(LoginPag

[wtr-general] undefined method `exists?' for link (PageObject gem)

2012-11-01 Thread Barry Horgan
Hi, I can't figure this out. I am trying to verify a links exists on a page, after user logs in, using .exists? method. It works when I use @browser.link(:text => "Sign Out") . to define the element but i want define link using PageObjedt gem using link(:signout, :text => 'Sign Out') Any ideas