예제 #1
0
 public static void DragAndDropFileFromExplorerToCenter(this AutomationElement el, FileInfo file, Explorer preStartedExplorer = null)
 {
     var explorer = preStartedExplorer ?? new Explorer("TestFiles");
     try {
         explorer.DragDropFileTo(file, el);
     } finally {
         Thread.Sleep(1000);
         explorer.Dispose();
     }
 }
예제 #2
0
 public static void DragAndDropMultipleFilesFromExplorerToCenter(this AutomationElement el, string folder, Explorer preStartedExplorer, params string[] files)
 {
     if (files.Count() < 2)
         throw new Exception("Must have at least two files");
     var explorer = preStartedExplorer ?? new Explorer("TestFiles");
     try {
         explorer.DragDropMultipleFilesTo(files, folder, el);
     } finally {
         Thread.Sleep(1000);
         explorer.Dispose();
     }
 }