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
>
>
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
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
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 #
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
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
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:-
>
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