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