Example #1
0
        public static API_GitHub unInstall_TortoiseGit(this API_GitHub gitHub, string msiPath)
        {
            var process       = msiPath.startProcess();
            var guiAutomation = new API_GuiAutomation(process);
            //step 1
            var tortoiseGitSetup = guiAutomation.windows()[0];

            tortoiseGitSetup.button("Next >").mouse().click();
            //step 2
            tortoiseGitSetup = guiAutomation.windows()[0];
            tortoiseGitSetup.button("Remove Installation").mouse().click();
            //step 3
            tortoiseGitSetup = guiAutomation.windows()[0];
            tortoiseGitSetup.button("Remove").mouse().click();
            //step 4
            for (int i = 0; i < 10; i++)
            {
                gitHub.sleep(2000, true);                // wait 2 secs and try again
                tortoiseGitSetup = guiAutomation.windows()[0];
                if (tortoiseGitSetup.button("Next >").isNull())
                {
                    tortoiseGitSetup.button("Finish").mouse().click();
                    break;
                }
            }
            return(gitHub);
        }
Example #2
0
        public static API_GitHub install_TortoiseGit(this API_GitHub gitHub, string msiPath)
        {
            var process          = msiPath.startProcess();
            var guiAutomation    = new API_GuiAutomation(process);
            var tortoiseGitSetup = guiAutomation.windows()[0];

            //tortoiseGitSetup.bringToFront();
            //step 1
            tortoiseGitSetup.button("Next >").mouse().click();
            //step2
            tortoiseGitSetup = guiAutomation.windows()[0];
            tortoiseGitSetup.radioButton("I accept the terms in the License Agreement").mouse().click();
            tortoiseGitSetup.button("Next >").mouse().click();
            //step3
            tortoiseGitSetup = guiAutomation.windows()[0];
            tortoiseGitSetup.button("Next >").mouse().click();
            //step4
            tortoiseGitSetup = guiAutomation.windows()[0];
            tortoiseGitSetup.button("Next >").mouse().click();
            //step5
            tortoiseGitSetup = guiAutomation.windows()[0];
            tortoiseGitSetup.button("Install").mouse().click();
            //step6
            for (int i = 0; i < 20; i++)
            {
                gitHub.sleep(2000, true);                // wait 2 secs and try again
                tortoiseGitSetup = guiAutomation.windows()[0];
                if (tortoiseGitSetup.button("Next >").isNull())
                {
                    tortoiseGitSetup.button("Finish").mouse().click();
                    break;
                }
            }
            return(gitHub);
        }