So this is not what you want to hear, but this is my super hacky solution:
target=browser.ul(:id => 'editor_sections').li(:index => j) target.drag_and_drop_by -300,200 begin browser.button(:id => 'editor_panel_save').when_present.click puts "clicked save for module sidebar" rescue => e begin browser.alert.ok puts Thread.current["name"].white.on_red + ": No events for the " +sectionName + " module" rescue => e end end
As you can see, the drag event for me triggers a jquery warning. I had the same problem as with the browser. Alert.ok does not always work. So I just wrapped it in an extra block -> start. In fact, browser.alert.ok is called and the warning is rejected. And that annoying random e is an empty error, is ignored.
If anyone has a real solution, I would like to see it.
cpoole
source share