public void Test_UploadNotAllowedToFolder(string folderName, string fileToUpload) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload Not Allowed File type to Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.UploadNotAllowedFileType(folderName, fileToUpload); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the warning message is displayed"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath("//span[@class = 'dnnModuleDigitalAssetsErrorMessage']")).Text, Is.EqualTo("File extension not allowed"), "The warning message is not displayed"); }