Jump to content

Download in IE


Paras
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • 1 year later...
  • Moderators

@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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...