R
Raveendran Perumalsamy
1. One OBJECT is available.
2. The source code for the OBJECT is
<div id="uploaderapi_swf_placeholder">
<embed id="uploaderapi_swf" height="1" width="1"
flashvars="apiId=uploaderapi_swf&apiInit=uploaderapi_Ready" style="left:
553.5px; top: 159px; width: 98px; height: 23px;"
allowscriptaccess="always" wmode="transparent" quality="high"
name="uploaderapi_swf"
src="http://s.ytimg.com/yt/swf/uploaderapi-vfl81865.swf"
type="application/x-shockwave-flash"/>
</div>
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.linktext, 'Sign In').click
sleep(2)
$ie.formid, 'gaia_loginform').text_fieldid,
'Email').set('jazzezravi')
$ie.formid, 'gaia_loginform').text_fieldid, 'Passwd').set('jazzez')
$ie.buttonname, 'signIn').click
sleep(2)
$ie.linktext, '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
2. The source code for the OBJECT is
<div id="uploaderapi_swf_placeholder">
<embed id="uploaderapi_swf" height="1" width="1"
flashvars="apiId=uploaderapi_swf&apiInit=uploaderapi_Ready" style="left:
553.5px; top: 159px; width: 98px; height: 23px;"
allowscriptaccess="always" wmode="transparent" quality="high"
name="uploaderapi_swf"
src="http://s.ytimg.com/yt/swf/uploaderapi-vfl81865.swf"
type="application/x-shockwave-flash"/>
</div>
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.linktext, 'Sign In').click
sleep(2)
$ie.formid, 'gaia_loginform').text_fieldid,
'Email').set('jazzezravi')
$ie.formid, 'gaia_loginform').text_fieldid, 'Passwd').set('jazzez')
$ie.buttonname, 'signIn').click
sleep(2)
$ie.linktext, '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