Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Hi, for Selenium Web driver 2 with c#, I am finding difficult to perform the Upload AND Download functionality using Autoit.

View previous topic View next topic Go down

Hi, for Selenium Web driver 2 with c#, I am finding difficult to perform the Upload AND Download functionality using Autoit.

Post by Aziz Mudgal on Fri May 24, 2013 5:40 pm

1. I have installed the Autoit V3 and copied the script and converted into .exe file.

2. the Autoit v3 script is as follows:---

FileCopy("C:\W3C.png", "C:\"&$CmdLine[1]&".png") ;Make a duplicate copy of the file, as same file name is not accepted

sleep(3000);delay for 3 seconds for the file to create
WinWaitActive("#32770", "Choose File to Upload",10)

WinFlash("Choose File to Upload","", 4, 500) ; Just to Flash the window
ControlSetText("Choose File to Upload", "", "[CLASS:Edit; INSTANCE:1]", "C:\"&$CmdLine[1]&".png")

ControlClick("Choose File to Upload", "","[CLASS:Button; INSTANCE:2]");



3. In the Test script of visual studio 2010 using Page object model(using NUnit). i wrote the following code to call the .exe file.

4. dd.Click(); // This is the upload browse button of firefox browser to upload the image in my project. after clicking this button i am calling the .exe file.
the code follows:

5. i have doubt whether to perform the click button or use the "Send key" functionality as i observed when the script executes the click the browse "The choose file to upload" dialog box is not being opened. please help me.

6. If any body has the readymade script written in Autoit V3 for file upload and file download please replay with the same and also please check whether the following code / procedure is correct or not to call the .exe file.

7. For me when i execute the following code the following error is being displayed, i.e means the code is trying to call the .exe file.

the error i got is something like this: "Array variable has incorrect number of subscripts or subscript dimension range exceeded".

if (dd.Text.Equals("Organisation Logo :"))
{
Console.WriteLine("yes the text matched");
dd.Click(); // This is the upload browse button of firefox browser to upload the image in my project. after clicking this button i am calling the .exe file.
ad.testImplicitWait();
Process myProcess = new Process();
try
{
myProcess.StartInfo.UseShellExecute = false;

myProcess.StartInfo.FileName = "C:\\Program Files\\AutoIt3\\SciTE\\OpenDialogaz.exe";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();



}
catch (Exception e)
{
Console.WriteLine(e.Message);
}





// Process.Start("C:\\Program Files\\AutoIt3\\SciTE\\OpenDialogaz.exe");
Console.WriteLine("the process got executed");
// ExtensionHelpers.SendKeys(dd, "C:\\Backup from Sagittarius\\AZIZ documents\\bank statements\\IMAGES OF DOCUMENTS\\Aziz Ahmed M.jpg", true);
// dd.Click();

}

Aziz Mudgal

Posts : 3
Join date : 2013-05-20

Back to top Go down

Re: Hi, for Selenium Web driver 2 with c#, I am finding difficult to perform the Upload AND Download functionality using Autoit.

Post by dpsele on Thu Jul 17, 2014 1:18 pm

hi Aziz,

Can you please let me know whether this issue of yours is resolved?
I am struggling with the similar kind of issue.

Thanks,
dpsele

dpsele

Posts : 1
Join date : 2014-07-17

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum