Hi I am trying to use the drag and drop funtionality,as I run the script
require "rubygems"
require "watir"
browser = Watir::Browser.new
browser.goto "xyz"
browser.a(:text => "Profile Package").flash
browser.a(:text => "Profile Package").click
puts browser.select_list(:name => 'lstTemplates').options
browser.select_list(:name => 'lstTemplates').select 'ProfilesTemplate.docx'
x = browser.li(:text,'Juliana Abdo')
y = browser.li(:xpath => "//*[@id='clsProfiles_selectedContent']")
x.drag_and_drop_on y
browser.button(:value => "Create Document").flash
browser.button(:value => "Create Document").click
I get this "C:\Ruby200\bin\ruby.exe -e
$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
"C:/Users/Windows7Default/RubymineProjects/External website/Proposal
Generator/ProfilePackage"
DL is deprecated, please use Fiddle
id:
id:
id:
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/element.rb:328:in
`assert_exists': Unable to locate element, using {:tag_name=>["li"],
:xpath=>"//*[@id='clsProfiles_selectedContent']"}
(Watir::Exception::UnknownObjectException)
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/drag_and_drop_helper.rb:61:in
`assert_target'
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/drag_and_drop_helper.rb:14:in
`block in drag_and_drop_on'
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/element.rb:477:in
`perform_action'
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/drag_and_drop_helper.rb:13:in
`drag_and_drop_on'
from C:/Users/Windows7Default/RubymineProjects/External website/Proposal
Generator/ProfilePackage:14:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1"
*The Html code for this particular section is as follows :*
<div class="selectionRegionGroup">
<script type="text/javascript">
<div class="selectionRegion">
<ul id="clsProfiles_selectedContent" class="contentList ui-sortable"
unselectable="on" style="-moz-user-select: none;"> </ul>
</div>
<div class="selectionRegion">
<ul id="clsProfiles_availableContent" class="contentList ui-sortable"
unselectable="on" style="-moz-user-select: none;">
<li id="108168" class="clsProfilesAvailableItem"> Juliana Abdo </li>
<li id="10737421935" class="clsProfilesAvailableItem"> Lisa Abe-Oldenburg </
li>
<li id="108171" class="clsProfilesAvailableItem"> Ranjan Agarwal </li>
<
I need to drag and drop entries from clsProfiles_availableContent to
clsProfiles_selectedContent
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.