Test Environment: Visual Studio + Firefox
I have a problem working with the save as dialog, and it's that after some time of being working perfectly, it suddenly stops working, I mean I can download an average of 10 files, and then after that suddenly the Save As dialog does not work anymore, this is the piece of code that I'm using to Save a file:
As you can see, I'm simulating the file menu with some clicks, (if you have a better idea please let me know) because it's kind of complicated, and then I'm creating the SaveAs Dialog and adding it to the monitor, as I said it works sometimes and then suddenly it stops working.
Could you help me please?
System.Threading.
Thread.Sleep(1000);
Element input2 = myManager.ActiveBrowser.Find.ByTagIndex("table", 0);
myManager.ActiveBrowser.Actions.ScrollToVisible(input2);
myManager.ActiveBrowser.Desktop.Mouse.Click(
MouseClickType.RightClick,0,150);
myManager.ActiveBrowser.Desktop.Mouse.Click(
MouseClickType.RightClick, 0, 150);
System.Threading.
Thread.Sleep(500);
System.Drawing.
Rectangle Coor3 = input2.GetRectangle();
Coor3.X = Coor3.X + 10;
Coor3.Y = Coor3.Y + 10;
myManager.ActiveBrowser.Actions.ScrollToVisible(input2);
myManager.ActiveBrowser.Desktop.Mouse.Click(
MouseClickType.LeftClick, 10,240);
SaveAsDialog saveas3 = SaveAsDialog.CreateSaveAsDialog(myManager.ActiveBrowser, DialogButton.SAVE, "C:\Test", myManager.Desktop );
myManager.DialogMonitor.AddDialog(saveas3);
try
{
saveas3.WaitUntilHandled(10000);
myManager.DialogMonitor.RemoveDialogs();
}
catch
{
}