xgmaker Posted July 14, 2015 Share Posted July 14, 2015 (edited) Hi all, I'm new here and have recently started using AutoIt alongside selenium to perform automation testing on my web application. I'm currently stuck with a situation where I want to automate testing on a drag and drop element (the user can drag and drop a file from their desktop/folder into the web application). I know in selenium I can simply insert the file path into the web element, but in this scenario I want to be able to test the functionality of the drag and drop. I'm currently using the AutoItx4java bridge and programming in java. To sum things up, I need help creating a script that opens a folder and drags and drops the item at a given coordinate. These coordinates are determined in selenium so I can't simply use an exe script since I would need to enter the coordinates as parameters. I understand how to do this strictly from an AutoIt script, but am having difficulty doing it with an AutoItX object in java. I'm also unsure of how to open a folder in java. AutoItX x = new AutoItX(); x.run("explorer.exe ", "C:\\users" );Any input or advice would be greatly appreciated. Edited July 14, 2015 by xgmaker arunapawar 1 Link to comment Share on other sites More sharing options...
RaiNote Posted July 14, 2015 Share Posted July 14, 2015 I think wrong section cause you are using AutoItX(Link2Support)Also Normal User path is C:\Users C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~ Link to comment Share on other sites More sharing options...
arunapawar Posted April 10, 2017 Share Posted April 10, 2017 (edited) It work x.run("explorer.exe C:\\Users","",AutoItX.SW_MAXIMIZE); Edited April 10, 2017 by arunapawar Link to comment Share on other sites More sharing options...
arunapawar Posted April 10, 2017 Share Posted April 10, 2017 (edited) code import java.io.File; import com.jacob.com.LibraryLoader; import autoitx4java.AutoItX; public class OpenDrive { public static void main(String[] args) { File file = new File("lib", "jacob-1.18-x64.dll"); System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath()); AutoItX x = new AutoItX(); x.run("explorer.exe C:\\Users","",AutoItX.SW_MAXIMIZE); } } Edited April 10, 2017 by arunapawar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now