Greetings and Salutations,
I have run into a rather aggravating issue with the framework. When I am dealing with Internet Explorer, the following code is able to invoke the HtmlInputFile control and accomplish the upload:
This works both in Windows 7 and Windows Server 2008. The problem comes when I attempt to do the same with Firefox and Chrome. The HtmlInputFile.Upload function does not work in either of these browsers in Windows Server 2008, and does not work in Chrome in Windows 7.
So I searched the forums here and found a workaround:
I have run into a rather aggravating issue with the framework. When I am dealing with Internet Explorer, the following code is able to invoke the HtmlInputFile control and accomplish the upload:
// Create the dialog listener
FileUploadDialog theDialog =
new
FileUploadDialog(waManager.ActiveBrowser, filePath, DialogButton.OPEN);
waManager.DialogMonitor.AddDialog(theDialog);
// Start the dialog monitor listening, then give it a chance to "breathe"
waManager.DialogMonitor.Start();
waManager.ActiveBrowser.WaitUntilReady();
// Now use the element
fileUploadControl.Upload(filePath, msecWait);
// Give the browser a moment to collect itself
waManager.ActiveBrowser.WaitUntilReady();
// Finally, turn the dialog monitor off after all is said and done
waManager.DialogMonitor.RemoveDialog(theDialog);
waManager.DialogMonitor.Stop();
This works both in Windows 7 and Windows Server 2008. The problem comes when I attempt to do the same with Firefox and Chrome. The HtmlInputFile.Upload function does not work in either of these browsers in Windows Server 2008, and does not work in Chrome in Windows 7.
So I searched the forums here and found a workaround:
// Create the dialog listener
FileUploadDialog theDialog =
new
FileUploadDialog(waManager.ActiveBrowser, filePath, DialogButton.OPEN);
waManager.DialogMonitor.AddDialog(theDialog);
// Start the dialog monitor listening
waManager.DialogMonitor.Start();
waManager.ActiveBrowser.WaitUntilReady();
// Now click the element and handle the dialog
fileUploadControl.MouseClick(MouseClickType.LeftDoubleClick);
theDialog.WaitUntilHandled(WAIT_Medium);
// Give the browser a moment to collect itself
waManager.ActiveBrowser.WaitUntilReady();
// Finally, turn the dialog monitor off after all is said and done
waManager.DialogMonitor.RemoveDialog(theDialog);
waManager.DialogMonitor.Stop();
- The problem becomes now that while Firefox and Chrome both succeed running on Windows 7, they fail to run on Windows Server 2008. And now Internet Explorer won't respond on either version of the operating system.
I have tried this with the following versions of Telerik Test Framework installed:
2012.1.719
- 2012.2.1204
- 2012.2.1420
At this point I am at a loss of what to try next.
Please help.
P.S. A bit of background: I am writing automated tests for three browsers: Chrome, Firefox and Internet Explorer. My desktop is a Windows 7 machine and where development occurs. Changes are committed to SCM. The automated tests are downloaded and built by a Windows Server 2008 instance from SCM. With the various versions of the framework I have made sure that I uninstall the previous version from both machines and cleanly installed the new, to make sure I did not run into any issues with version conflicts.