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:-
>    
>    
>     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_user_data 
> a.account').click           -------------> I am getting the error here
>     end
>    
>      def create_account
>     @browser.element(css: 
> 'div.ml_function.ml_function_arrowtoptoleft.padding_top_twenty.height_fifty 
> input.ml_function_button_createaccountRegister').click
>      endend
>    
>    2. 
>    
>    
>    
>    When(/^I click on sign in$/) do    -------------> I am getting the error 
> here
>     on(Homepage).sign_in
>    end
>    
>    
>    3. 
>    
>    Scenario: User needs to create a new account
>    4. 
>    
>    Given I am on xxx homepage
>    
>    5. 
>    
>    When I click on sign in       -------------> I am getting the error 
>    here
>    6. 
>    
>    And I fill the user information
>    7. 
>    
>     And I click Create Account 
>    8. 
>    
>    Then I should see the user details
>    
> I am getting this error Watir::Exception::UnknownObjectException: unable 
> to locate element, using {:css=>"div.links-static ul li.account 
> div#login_user_data a.account"}
> ./features/lib/pages/Homepage.rb:12:in `sign_in'
> ./features/step_definitions/Homepage_steps.rb:6:in `/^I click on sign in$/'
> ./features/Homepage.feature:9:in `When I click on sign in'
>
> When I run the scenario what exactly I experienced is:- The browser is 
> opened but the url is not displaying in search bar, in search bar it is 
> displaying the "data:,". I don't know why it is displaying the data.
>
>
> Thank You,
> Ajay.
>

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