This is a migrated thread and some comments may be shown as answers.

FileUpload Control not working in IE9

1 Answer 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zabeer Jainullabudeen
Top achievements
Rank 1
Zabeer Jainullabudeen asked on 12 Aug 2011, 11:38 PM
Hi,
  We have a website that I am trying to automate. Basically there is a Html Input File control and its textbox is disabled. I need to click on its 'browse' button, navigate to the right file location and open a file. Once this is done, I need to upload this file.

We have been using WebAii 2010.2 version for our automation. We wont be able to upgrade to the newer version of the webaii suite. I managed to get this automated and everything seems to work fine on IE8 in Windows 7. But When I try to run this on IE9 on Windows 7, the file dialog opens and then right away closes. below is my code snippet

         
      #1      _manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
 
            _manager.DialogMonitor.AddDialog(new FileUploadDialog(_manager.ActiveBrowser, fileNameToUpload, DialogButton.OPEN, "Choose File to Upload"));
            _manager.DialogMonitor.Start();
            _manager.ActiveBrowser.WaitUntilReady();
            HtmlInputFile updlg = _manager.ActiveBrowser.Find.ById<HtmlInputFile>("ctl00_MainContent_FileUpload1");
       #2     updlg.Click();

when I comment line #1, the dialog opens and right away closes. When I leave line #1 uncommented, then the dialog opens, after a couple of secs, it flickers,
then it flickers, then it stays there forever without moving to the next line of code.

for line #2, updlg.MouseClick() doesnt seem to do anything.


But all of this works fine in IE8!!! Can you guys tell me if there is any way this can be made to work in IE9? If that
is not possible, then is there an Add on for newer versions for Firefox?

When I try firefox, I see it open the window, but nothing happens and the address bar has this text: "about:blank?!!AOT2.0!Pipe.ArtOfTest.WebAii.BrowserProvisioner_517858088"



Am i missing some steps in setting up firefox?


1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 15 Aug 2011, 10:20 PM
Hello Zabeer,

Support for IE9 was not introduced until version 2010.3, so your scenario is not expected to work in version 2010.2.

What version of Firefox are you using? Firefox 4 is not compatible with our 2010 version. If you are using FF 3.x, try changing your code to use actual mouse clicks, like this:

Find.ById<HtmlInputControl>("uploadbutton").MouseClick(MouseClickType.LeftClick);

Also, ActiveBrowser.WaitUntilReady(); should go after the actual upload. This ensures the upload is done and the browser is in a ready state before continuing the test.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
Zabeer Jainullabudeen
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or