Exemplo n.º 1
0
        public static void CopySeleniumJars(IProgress <string> progress, bool showUiDialogs, string networkPath, NetworkCredential networkCredential)
        {
            var fileDirOperations = new FileDirOperations(networkPath, networkCredential, @"C:\Selenium");

            progress.Report("Checking for newer version(s)..." + Environment.NewLine);
            if (!fileDirOperations.IsLatestVersion())
            {
                progress.Report("Newer version(s) available on the server. Copying now..." + Environment.NewLine);
                fileDirOperations.DeleteLocalContents();
                try
                {
                    fileDirOperations.CopyServerContents(showUiDialogs);
                    progress.Report("Latest version(s) copied successfully." + Environment.NewLine);
                }
                catch (Exception e)
                {
                    progress.Report(
                        "Copy operation interrupted. Please ensure latest files are copied. Click the button again. " +
                        e.Message + Environment.NewLine);
                }
            }
            else
            {
                progress.Report("All local files are latest version(s)." + Environment.NewLine);
            }
        }
Exemplo n.º 2
0
        public static bool SeleniumJarsExistLocally()
        {
            var fileDirOperations = new FileDirOperations(@"C:\Selenium");

            return(fileDirOperations.CheckSeleniumJarsExistLocally());
        }