Jump to content
Sign in to follow this  
Paras

Download in IE

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

Share this post


Link to post
Share on other sites

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

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...