NoMethodError: undefined method `object_respond_to?' for nil:NilClass when using text_field set method

22 views
Skip to first unread message

Basim Baassiri

unread,
Jul 23, 2010, 10:06:31 AM7/23/10
to va...@googlegroups.com

This is the code i was using
    require 'watir-vapir'
    @browser = Watir::Browser.new
    @browser.button(:id,"watch-share").click
    @browser.button(:class=>"watch-share-button yt-uix-button",:index=>2).click

    @browser  = Watir::Browser.attach(:title, 'Login | Facebook')

    @browser.text_field(:id, "email").set <username>
    @browser.text_field(:id, "pass").set <password>
    @browser.button(:name, "login").click

    @browser.link(:class, "UIShareStage_InlineEdit inline_edit").fire_event "onclick"
    sleep 2
    # change the video title to my own
    @browser.text_field(:class, "inputtext inline_edit").set('test_check_facebook_shared_link')
    # i get the exception here
    #click away so it gets set
    @browser.div(:class, "UIShareStage_Title").fire_event "onclick"
    @browser.button(:value, "Share").click

This is the exception i got
NoMethodError: undefined method `object_respond_to?' for nil:NilClass
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:436:in `method_from_element_object'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/container.rb:108:in `assert_exists'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:409:in `method_from_element_object'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:63:in `value'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:170:in `append'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:740:in `with_highlight'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/container.rb:108:in `assert_exists'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:733:in `with_highlight'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:129:in `append'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:188:in `set'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:740:in `with_highlight'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/container.rb:108:in `assert_exists'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:733:in `with_highlight'
    C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:185:in `set'
    html5player.rb:207:in `test_facebook_share_from_youtube'


Any ideas?

Basim

Ethan

unread,
Jul 23, 2010, 9:39:38 PM7/23/10
to va...@googlegroups.com
Basim,
thanks for the report. that is an issue that I have encountered myself, and I have fixed in the code. that will be included in the next release, which should be soon. 

-Ethan
Reply all
Reply to author
Forward
0 new messages