From: Raveendran Perumalsamy Date: 2009-07-18T15:49:48+09:00 Subject: Embed tag with watir 1. One OBJECT is available. 2. The source code for the OBJECT is
3. I need to click the OBJECT. I have tried: $ie.element_by_xpath("//embed[@id='uploaderapi_swf']") ==> main.rb:18: undefined method `click' for nil:NilClass (NoMethodError) THE FULL CODE is : require 'rubygems' require 'watir' $ie=Watir::IE.new #$ie.maximize() $ie.goto("http://www.youtube.com/") sleep(2) $ie.link(:text, 'Sign In').click sleep(2) $ie.form(:id, 'gaia_loginform').text_field(:id, 'Email').set('jazzezravi') $ie.form(:id, 'gaia_loginform').text_field(:id, 'Passwd').set('jazzez') $ie.button(:name, 'signIn').click sleep(2) $ie.link(:text, 'Upload Video File').click sleep(2) #Here i am struggling to click the object "upload video" $ie.element_by_xpath("//embed[@id='uploaderapi_swf']") #==> NEED HELP HERE Please help to do this -- Posted via http://www.ruby-forum.com/.