drag and drop in watir

1 view
Skip to first unread message

swathi

unread,
May 9, 2008, 4:55:41 AM5/9/08
to watir-...@googlegroups.com
hi

we are learning about the drag and drop feature associated with watir. Our code is


require 'test/unit'
require 'watir'
include Watir
ie = Watir::IE.start('http://demo.script.aculo.us/shop') 
ie.maximize
ie.image(:id,'product_1').getElementById(:id,'cart')

We get the following error message

drag.rb:6: undefined method `getElementById' for #<Watir::Image:0x334f5b4> (NoMethodError)

Could anybody help us in getting it right. Thanks in advance.

Paul Rogers

unread,
May 9, 2008, 10:49:31 AM5/9/08
to watir-...@googlegroups.com
drag and drop is a very difficult thing to do in watir, as it depends
entirely on how the drag and drop code is implemented in the app under
test. I know of at least ways it can be implemented.
If you dont understand the error you are gettin, I would suggest
forgetting about doing drag and drop with watir until you have an
excellent understanding of watir and javascript

Paul

Reply all
Reply to author
Forward
0 new messages