Re: [wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Titus Fortner
Follow the template here: https://github.com/cheezy/page-object/wiki/Creating-and-using-page-objects look at how it defines page_url On Wed, Aug 10, 2016 at 1:59 PM, Ajay Reddy wrote: > The Updated code is here:- > > Scenario: User needs to create a new account > > Given I am on xxx homepage > >

Re: [wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Ajay Reddy
The Updated code is here:- Scenario: User needs to create a new account Given I am on xxx homepage When I click on sign in And I fill the user information And I click Create Account Then I should see the user details Given(/^I am on xxx homepage$/) do visit(Homepage) end When(/^I click on s

Re: [wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Titus Fortner
Same error being the page doesn't load, even though you have a properly formatted page_url defined and are using the visit method on the class? Need to see the updated code. You can also try putting a sleep before the click to see if the page is loading but hasn't finished before trying to click

Re: [wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Ajay Reddy
I have changed from gto to page_url and instead #on I am using #visit but I am getting same error. On Wednesday, August 10, 2016 at 12:32:32 PM UTC-5, Titus Fortner wrote: > > That's a page object, it doesn't show your step code. > Best practice is to define a page_url and use #visit instead of #

Re: [wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Titus Fortner
That's a page object, it doesn't show your step code. Best practice is to define a page_url and use #visit instead of #on https://github.com/cheezy/page-object/wiki/Creating-and-using-page-objects On Wed, Aug 10, 2016 at 12:19 PM, Ajay Reddy wrote: > Here is the data for xxx website and taking d

[wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Ajay Reddy
Here is the data for xxx website and taking data from yaml file. class UserInfo include PageObject include DataMagic text_field(:first_name, :id => 'b_firstname') text_field(:last_name, :id => 'b_lastname') text_field(:email_id, :id => 'reg_email') radio(:gender, :css => 'ml_panelre

[wtr-general] Re: Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Titus Fortner
Data is what is displayed by default when open a new browser. Your "Given I am on xxx homepage" is not working as desired. On Wednesday, August 10, 2016 at 11:51:33 AM UTC-5, Ajay Reddy wrote: > > Hi All, > > I am using page factory pattern, > >1. > >Here is My class Homepage:- >

[wtr-general] Watir::Exception::UnknownObjectException: unable to locate element

2016-08-10 Thread Ajay Reddy
Hi All, I am using page factory pattern, 1. Here is My class Homepage:- class Homepage include PageObject include Configuration def open goto("url") end def sign_in @browser.element(css: 'div.links-static ul li.account div#login_us