Comments (4)
@vikramv, thanks for the update. Did you see my solution as shown by the link above Drag and Drop in selenium java?
I took a look at your code, I see you are also using rcorreia/drag_and_drop_helper.js .
I also pushed my solution to my github se-drag-n-drop java
from elemental-selenium-tips.
Here are the reason and workaround why DnD does not work SeleniumHQ/selenium#1365
Workaround for Ruby is here http://elementalselenium.com/tips/39-drag-and-drop
from elemental-selenium-tips.
@RomanIsko Thanks for the input, I figured out a java implementation using the dnd.js and your C# code a few weeks back:
/**
* Solution from elemental-selenium-tips
* https://github.com/tourdedave/elemental-selenium-tips/blob/master/39-drag-and-drop/csharp/DragAndDrop.cs
* JSDriver.ExecuteScript(dnd_javascript + "$('#column-a').simulateDragDrop({
* dropTarget: '#column-b'});");
*
* NOTE: Seems fragile, not sure if this works for XPATH or other src/dst type strings
* TODO: would be good if it worked with WebElement, or BY
*
* @param driver
* @param src
* - css string for source element
* @param dst
* - css string for destination element
*/
public void dragDrop(WebDriver driver, String src, String dst) {
String js = String.format("$('%s').simulateDragDrop({ dropTarget: '%s'});",src,dst);
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript(dragndrop_js + js);
}
see: Drag and Drop in selenium java
from elemental-selenium-tips.
@timrsfo you can refer to Java solution vikramvi/Selenium-Java@a1354ca, this is needed for HTML5 drag and drop which can't be done with standard selenium api.
from elemental-selenium-tips.
Related Issues (10)
- DownloadFileRevisited is just an assertion, right? HOT 1
- Marionette Driver instead of FirefoxDriver HOT 1
- Question - RE Ruby Updates HOT 2
- Error : $.growl is not a function while running the Growl with Java HOT 4
- Application error HOT 2
- Automatic code quality checks for Python?
- Incorrect Content-Type in download file example (ruby)
- http://the-internet.herokuapp.com/context_menu is not working on Firefox 65.0.1
- How can we import the driver and By class in the javascript file ? i am not able to resolve the issue for a custom plugin created by me for selenium ide please help me out
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elemental-selenium-tips.