Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
Aziz Mudgal
Posts : 3
Join date : 2013-05-20

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

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();

}
avatar
dpsele
Posts : 1
Join date : 2014-07-17

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

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
Back to top
Permissions in this forum:
You cannot reply to topics in this forum