示例#1
0
		public void UploadFileToFolder(string rootFolderName, string folderName, string fileNameToUpload)
		{
			Trace.WriteLine(BasePage.TraceLevelComposite + "'Upload File to Folder:'");

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);

			adminFileManagementPage.SelectFolderFromTreeView(rootFolderName, folderName);

			//adminFileManagementPage.SetItemsPerPage("All");

			adminFileManagementPage.UploadFileToFolder(folderName, fileNameToUpload);
		}
		public void Test_UploadFileToSubFolder(string folderName, string subFolderName, string fileToUpload)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload File to Folder:'");

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);

			adminFileManagementPage.SelectSubFolderFromTreeView(folderName, subFolderName);

			adminFileManagementPage.SetItemsPerPage("All");

			adminFileManagementPage.UploadFileToFolder(folderName, fileToUpload);

			adminFileManagementPage.OpenUsingButtons(_baseUrl);

			adminFileManagementPage.SelectSubFolderFromTreeView(folderName, subFolderName);

			Trace.WriteLine(BasePage.TraceLevelPage + "Verify the the size of uploaded file is correct");
			Assert.That(adminFileManagementPage.WaitForElement(
						By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + fileToUpload + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text,
						Is.Not.EqualTo("0.0 KB"),
						"The File is not loaded correctly");
		}