Jump to content
WAPT Forum
Sign in to follow this  
avin_mehya

Can i automate FTP upload using WAPT

Recommended Posts

Hi Team,

We have been performing performance testing of our application UI using WAPT 4.3

 

We have few scenarios which involve a two part process:

- First part involves FTP of a file

- Second part takes place from UI where we process the file which was FTPed in first step

 

Second step can be achieved using WAPT

 

We wanted to understand by any chance can we also work upon the first step using WAPT.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

WAPT doesn't support FTP protocol.

But you can use JavaScript to run shell command and upload file to FTP with help of third party tool.

Share this post


Link to post
Share on other sites

We are trying to achieve this using a Batch file. This batch file has been called inside WAPT using Javascript.

Issue here is that the Batch file individually runs fine. Also the same runs perfectly fine inside the browser console. But when we run this through WAPT, this fails.

Is there some step which we are missing?

 

We have IE11 on WAPT machine and i presume that WAPT uses the same.

 

Below is the Javascript code

 

 

var myObject = new ActiveXObject("WScript.Shell");
var result = myObject.Run("D:\\welcome.bat");
log.message("Batch File executed successfully");
Welcome.bat file contains code to place files to a remote server.

Share this post


Link to post
Share on other sites

Try to execute following code:

 

var command = "D:\\welcome.bat"
var argument = "";

var shellapp = new ActiveXObject("Shell.Application");
shellapp.ShellExecute(command, argument, null, "open", 1);

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×