Jump to content
Paras

Download in IE

Recommended Posts

Paras

Hi,

I am trying to download from IE11 using autoIT. It works fine on my local system but does not work when I try to run my scripts on a remote machine (I am using Selenium GRID). Below is the code:

private const string SaveAs = "Save As";
private const string KeyboardTab = "{TAB}";
private const string KeyboardF6 = "{F6}";

public string IEFileSaveAs(string filePath)
        {
            _windHandle = autoIt.WinGetHandle("[Class:IEFrame]", "");
            _winTitle = "[HANDLE:" + _windHandle + "]";

            autoIt.WinActivate(_winTitle, "");
            autoIt.Send(KeyboardF6);
            autoIt.Sleep(2000);
            autoIt.Send(KeyboardTab);
            autoIt.Sleep(1000);
            autoIt.Send("{DOWN}");
            autoIt.Sleep(1000);
            autoIt.Send("a");

            Thread.Sleep(3000);

            autoIt.WinWaitActive(SaveAs, "", 10);
            autoIt.WinActivate(SaveAs, "");

            autoIt.ControlFocus(SaveAs, "", "[CLASS:Edit;INSTANCE:1]");
            autoIt.Send(filePath);

            Thread.Sleep(2000);

            autoIt.ControlClick(SaveAs, "", "[TEXT:&Save]", "LEFT");

            autoIt.WinActivate(_winTitle, "");
            autoIt.Send(KeyboardF6);
            autoIt.Sleep(2000);
            autoIt.Send(KeyboardTab);
            autoIt.Sleep(1000);
            autoIt.Send(KeyboardTab);
            autoIt.Sleep(1000);
            autoIt.Send("{ENTER}");

            return filePath;

        }

Could please someone help me?

Thanks,

Paras

Share this post


Link to post
Share on other sites
JLogan3o13

@VITSUSA this is about the fourth time someone from the Moderation team has said something to you about posting in old threads, posts that make no sense, etc.

For the very last time before we start with the sanctions - if you have a question, start a new thread and explain in detail what you want to accomplish, what you have tried on your own, and what trouble you are running into.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×