public void Test001_InstallHostExtension()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Install a Host Extension'");

			var hostExtensionsPage = new HostExtensionsPage(_driver);
			hostExtensionsPage.OpenUsingButtons(_baseUrl);
			hostExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.ModulesAccordion));

			int itemNumber = hostExtensionsPage.FindElements(By.XPath(ExtensionsPage.ModulesExtensionsList)).Count;

			hostExtensionsPage.InstallExtension(@"P1\" + _hostFileToUpload);

			hostExtensionsPage.OpenUsingButtons(_baseUrl);
			hostExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.ModulesAccordion));

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(hostExtensionsPage.FindElements(By.XPath(ExtensionsPage.ModulesExtensionsList)).Count,
			            Is.EqualTo(itemNumber + 1),
			            "The Extension is not added correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Extension name is present in the list");
			Assert.IsTrue(
				hostExtensionsPage.ElementPresent(By.XPath("//tr[td/span[text() = '" + _hostExtensionNameToInstall + "']]")),
				"The Extension name is not present in the list");
		}
Exemple #2
0
		public void RunBeforeBVTTests()
		{
			Trace.WriteLine(BasePage.TraceLevelComposite + "BVT Setup");

			XDocument doc = XDocument.Load(DataFileLocation);

			XElement settings = doc.Document.Element("Tests").Element("settings");

			string testName = settings.Attribute("name").Value;
			string installerLanguage = settings.Attribute("InstallerLanguage").Value;

			IWebDriver driver = TestBase.StartDriver(settings.Attribute("browser").Value);
			string baseUrl = settings.Attribute("baseURL").Value;
			bool dummyProvider = settings.Attribute("runWithDummyCachingProvider")
										 .Value.Equals("yes", StringComparison.InvariantCultureIgnoreCase);

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			var installerPage = new InstallerPage(driver);

			installerPage.OpenUsingUrl(baseUrl);

			installerPage.SetInstallerLanguage(installerLanguage);
			installerPage.SetDictionary(installerLanguage);

			installerPage.FillAccountInfo(settings);

			installerPage.ClickOnContinueButton();

			installerPage.WaitForInstallationProcessToFinish();

			installerPage.ClickOnVisitWebsiteButton();

			installerPage.WelcomeScreen(); 

			var adminSiteSettingsPage = new AdminSiteSettingsPage(driver);
			adminSiteSettingsPage.OpenUsingButtons(baseUrl);
			adminSiteSettingsPage.DisablePopups();

			if (dummyProvider)
			{
				var hostExtensionsPage = new HostExtensionsPage(driver);
				hostExtensionsPage.OpenUsingButtons(baseUrl);
				hostExtensionsPage.InstallExtension(@"Drivers\" + "DummySerializationCachingProvider_01.00.01_Install.zip");
			}
			
			driver.Quit();
		}