MoveTargetOutOfBoundsError when trying to perform drag and drop in iframe -
i'm trying automate tests web application, , many of tests require drag , drop inside <iframe>
. dragging anchor 1 jspcontainer within same <iframe>
. keep getting selenium::webdriver::error::movetargetoutofboundserror:
when trying perform drag , drop. same error when trying use hover
method. when use click
method click on anchor works correctly, , can see link highlight if had been clicked. below of code , output through irb.
irb(main):048:0> = b.frame(:id => "iframe").link(:text => "anchor") => #<watir::anchor:0x..f02685d6 located=false selector={:text=>"anchor", :tag_name=>"a"}> irb(main):049:0> c = b.frame(:id => "iframe").div(:id => "drop") => #<watir::div:0x5ed628c6 located=false selector={:id=>"drop", :tag_name=>"div"}> irb(main):050:0> a.wd.location => #<struct selenium::webdriver::point x=295, y=339> irb(main):051:0> c.wd.location => #<struct selenium::webdriver::point x=30, y=329> irb(main):052:0> c.style => "width: 250px; height: 100px;" irb(main):053:0> b.frame(:id => "iframe").locate => #<watir::frameddriver:0x24f3738 @element=#<selenium::webdriver::element:0x..fc6af7d56 id="{11f61368-a4ea-4d a9-9084-6307abcda2aa}">, @driver=#<selenium::webdriver::driver:0x..f97d59986 browser=:firefox>> irb(main):054:0> a.drag_and_drop_on c selenium::webdriver::error::movetargetoutofboundserror: given coordinates (432, 542) outside document. error: movetargetoutofboundserror: target location (432, 544) not on webpage. irb(main):056:0* a.hover selenium::webdriver::error::movetargetoutofboundserror: given coordinates (432, 542) outside document. error: movetargetoutofboundserror: target location (432, 544) not on webpage. irb(main):059:0* a.click => []
one thing i've noticed when setting variables a
, c output irb says located=false
. can use exists?
, click
, , flash
methods show watir-webdriver know elements are. or suggestions appreciated.
i'm using watir-webdriver 0.6.2, firefox 18.0.2, windows 7 64-bit
Comments
Post a Comment