The code that is below is something that I quite frequently have to use in order to export data from my application and handle the overwrite box if it pops up. My issue is, I have to copy and paste this in every single new test that I do and make sure I change all the right values. What I would like to do is put this in a 'library' file so I can just access a single function call in each test that will handle all of this, instead of copying and changing ALL of this text every single time. This is in an attempt to make my project a little smaller, and make it easier to maintain and create.
However. The manager class, and call to the element to open the dialog handler are getting in my way to moving this into a separate class file. Does anybody know of a way I might be able to accomplish this?
GenericDialog genDialog = new GenericDialog(Manager.ActiveApplication, "Save As", false, 6);
SaveAsDialog saveDlg = SaveAsDialog.CreateSaveAsDialog(Manager.ActiveApplication, DialogButton.SAVE, queryFilePath);
// Wait for '1000' msec.
// Handle the overwrite box on save.
Applications.dTIMSexe.dTIMS_V9_For_Windows.ExportAllTextblock.User.Click(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 23, 19, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));