NoMethodError: undefined method `object_respond_to?' for nil:NilClass when using text_field set method
Reported by bbaassiri | July 23rd, 2010 @ 02:51 PM | in v1.7.1 (closed)
Ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
vapir gems
vapir-common (1.7.0)
vapir-firefox (1.7.0)
Firefox 3.6.6 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729)
Steps to reproduce:
This is the code i was using
require 'watir-vapir'
@browser = Watir::Browser.new
@browser.goto 'http://www.youtube.com/watch?v=QVo0Mlm-S2A'
@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
Actual Results
This is the exception i got
NoMethodError: undefined method object_respond_to?' for
nil:NilClass<br/>
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'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/container.rb:108:in
assert_exists'<br/>
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'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:63:in value'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:170:in
append'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:740:in with_highlight'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/container.rb:108:in
assert_exists'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:733:in with_highlight'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:129:in
append'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:188:in set'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:740:in with_highlight'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/container.rb:108:in
assert_exists'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/element.rb:733:in with_highlight'<br/>
C:/development/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.0/lib/vapir-comm
on/elements/elements.rb:185:in set'<br/>
html5player.rb:207:in `test_facebook_share_from_youtube'
Expected Results:
value to be saved
Comments and changes to this ticket
-

Ethan August 4th, 2010 @ 04:57 PM
- Assigned user set to Ethan
- Tag set to existence, set, textfield
- State changed from new to resolved
- Milestone set to v1.7.1
- Milestone order changed from 1 to 0
This should be fixed by commit c5b28dea88b6f92af5c7e5da30f44139dcc11122
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.