Created
December 17, 2014 13:36
-
-
Save ederign/e3bd5b9585817b8e5ed6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import org.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
public class Test { | |
public static void main( String[] args ) throws IOException { | |
WebDriver driver = null; | |
try { | |
driver = new FirefoxDriver(); | |
driver.navigate().to( "http://localhost:8080/kie/" ); | |
//dnd 6x6 grid inside a column | |
String dnd1 = "jQuery('#a').simulateDragDrop({ dropTarget: '#b'});"; | |
//put html component in left | |
String dnd2 = "$('#c').simulateDragDrop({ dropTarget: '#d'});"; | |
//put dashbuilder component in right | |
String dnd3 = "$('#e').simulateDragDrop({ dropTarget: '#f'});"; | |
try{ | |
final Object o = ( (JavascriptExecutor) driver ) | |
.executeScript( dnd1 ); | |
} | |
catch ( Exception e ){ | |
System.out.println(); | |
} | |
try{ | |
final Object o = ( (JavascriptExecutor) driver ) | |
.executeScript( dnd2 ); | |
} | |
catch ( Exception e ){ | |
System.out.println(); | |
} | |
try{ | |
final Object o = ( (JavascriptExecutor) driver ) | |
.executeScript( dnd3 ); | |
} | |
catch ( Exception e ){ | |
System.out.println(); | |
} | |
} finally { | |
driver.close(); | |
driver.quit(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment