I want to perform drag and drop between two SVG charts which has g tag.Is it possible to perform using watir-webdriver.
            Asked
            
        
        
            Active
            
        
            Viewed 177 times
        
    1
            
            
        - 
                    2Without your code or URL I can't test this myself, and I don't know anything about SVG, but try implementing Solution 2 from this question: http://stackoverflow.com/questions/10713102/how-do-i-locate-a-custom-tag-like-g and see if you can do something like `browser.g(:id, 'my_id').drag_and_drop_by 50, 50`. Not sure what technologies you are using, so I don't know if this will work or not, but it can't hurt to try that Solution 2. – pjd Aug 24 '15 at 17:37
1 Answers
1
            
            
        dragging and dropping is possible in watir.
Haven't tested this, but here's how it might work. (used the css selector b/c I'm not sure whether or not watir supports the g tag on a object-level basis...)
chart1 = browser.element(:css => "g[id='chart1']")
chart2 = browser.element(:css => "g[id='chart2']")
chart1.drag_and_drop_on(chart2)
Let me know if this works for you
Credits to similar question: Is drag-and-drop possible in watir-webdriver?
 
    
    
        Community
        
- 1
- 1
 
    
    
        boulder_ruby
        
- 38,457
- 9
- 79
- 100
