public void Automation_MO_ArchiveTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string fileName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='file1']/..//filename"); string sourceMailbox8 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry8']/..//source"); try { LoginAndReloadFile(login, password, client, projectName, fileName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().SelectEntryBylocator(sourceMailbox8); User.AtUsersForm().SelectAction(ActionType.Archive); User.AtUsersForm().Apply(); User.AtUsersForm().ConfirmArchive(); User.AtUsersForm().VerifyLineNotExist(sourceMailbox8); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_MO_ImportTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//name"); string fileName1 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='file1']/..//filename"); string fileName2 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//metaname[text()='file1']/..//filename"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().VerifyLinesCount(RunConfigurator.GetCSVlinesCount(Path.GetFullPath(RunConfigurator.ResourcesPath + fileName2))); User.AtUsersForm().OpenImportDialog(); User.AtUsersForm().ChooseFile(fileName1); User.AtUsersForm().ConfirmUploading(); User.AtUsersForm().AssertImportFailed(); } catch (Exception e) { LogHtml(Browser.GetDriver().PageSource); throw e; } }
public void Automation_MO_SyncingButtonsTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string sourceMailbox = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry1']/..//source"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().SelectEntryBylocator(sourceMailbox); User.AtUsersForm().SelectAction(ActionType.Sync); User.AtUsersForm().AssertApplyIsEnabled(); User.AtUsersForm().Apply(); User.AtUsersForm().ConfirmSync(); User.AtUsersForm().WaitForState(sourceMailbox, State.Syncing, 10000); User.AtUsersForm().WaitForState(sourceMailbox, State.Synced, 60000); User.AtUsersForm().SelectEntryBylocator(sourceMailbox); User.AtUsersForm().SelectAction(ActionType.Sync); User.AtUsersForm().AssertApplyIsEnabled(); User.AtUsersForm().SelectAction(ActionType.Complete); User.AtUsersForm().AssertApplyIsEnabled(); } catch (Exception e) { LogHtml(Browser.GetDriver().PageSource); throw e; } }
public CDSC2CTest() : base(ProbeType.CDSC2C) { clientName = RunConfigurator.GetValueByXpath("//CDSC2C/@client"); tenants = RunConfigurator.GetValueByXpath("//CDSC2C/@tenants"); projectName = RunConfigurator.GetValueByXpath("//CDSC2C/@project"); msolUri = RunConfigurator.GetValueByXpath("//CDSC2C/@msolUri"); }
public ProbeIntegrationTest() : base(ProbeType.Integration) { clientName = RunConfigurator.GetValueByXpath("//IntegrationProbe/@client"); projectName = RunConfigurator.GetValueByXpath("//IntegrationProbe/@project"); adGroupName = RunConfigurator.GetValueByXpath("//IntegrationProbe/@adgroup"); tenants = RunConfigurator.GetValueByXpath("//IntegrationProbe/@tenants"); }
public ProbeDiscoverAndMatchingTest() : base(ProbeType.Discovery) { clientName = RunConfigurator.GetValueByXpath("//DiscoveryProbe/@client"); projectName = RunConfigurator.GetValueByXpath("//DiscoveryProbe/@project"); adGroupName = RunConfigurator.GetValueByXpath("//DiscoveryProbe/@adgroup"); tenants = RunConfigurator.GetValueByXpath("//DiscoveryProbe/@tenants"); }
public void Automation_MO_UserMigrationButtonsTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().WaitForRowsAppear(); User.AtUsersForm().SelectAction(ActionType.Sync); User.AtUsersForm().AssertApplyIsDisabled(); User.AtUsersForm().SelectAction(ActionType.Stop); User.AtUsersForm().AssertApplyIsDisabled(); User.AtUsersForm().SelectAction(ActionType.Complete); User.AtUsersForm().AssertApplyIsDisabled(); } catch (Exception e) { LogHtml(Browser.GetDriver().PageSource); throw e; } }
public void PS_MD_CompleteDeltaDiscoveryTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//name"); string sourceTenant = RunConfigurator.GetTenantValue("T1->T2", "source", "name"); string sourceMailbox1 = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//metaname[text()='entry1']/..//source"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().EditTenants(); User.AtTenantsConfigurationForm().OpenDiscoveryTab(); User.AtTenantsConfigurationForm().DownloadLogs(sourceTenant); RunConfigurator.CheckDiscoveryFileIsDownloaded(); Assert.IsTrue(RunConfigurator.AssertLineExistsInCsv(Store.TenantLog, $"Updated mailbox properties for {sourceMailbox1}"), "Line does not exist in log"); } catch (Exception e) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_MO_FullSearchTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string sourceMailbox1 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry1']/..//source"); string sourceMailbox2 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry2']/..//source"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().PerformSearch(sourceMailbox1); User.AtUsersForm().VerifyLineNotExist(sourceMailbox2); User.AtUsersForm().VerifyLineisExist(sourceMailbox1); User.AtUsersForm().VerifyLinesCount(1); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_IN_GroupsViewTest() { string userName = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/../name"); string project = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project2']/..//name"); string adGroup2 = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project2']/..//metaname[text()='adgroup2']/../name"); try { LoginAndSelectRole(userName, password, client); SelectProject(project); User.AtProjectOverviewForm().OpenTotalGroups(); if (!User.AtGroupsMigrationForm().IsLineExist(adGroup2)) { User.AtGroupsMigrationForm().PerformSearch(adGroup2); } User.AtGroupsMigrationForm().SelectEntryBylocator(adGroup2); User.AtGroupsMigrationForm().SelectAction(ActionType.AddToWave); User.AtGroupsMigrationForm().AssertApplyIsDisabled(); User.AtGroupsMigrationForm().SelectAction(ActionType.AddToProfile); User.AtGroupsMigrationForm().AssertApplyIsDisabled(); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_PS_MO_PermissionsPrepareTest() { string sourceMailbox = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//metaname[text()='entryps4']/..//target"); string sourceLogin = RunConfigurator.GetTenantValue("T1->T2", "target", "user"); string sourcePassword = RunConfigurator.GetTenantValue("T1->T2", "target", "password"); string permSourceMailbox = RunConfigurator.GetTenantValue("T1->T2", "target", "psuser2");; List <string> trustees = new List <string>(); trustees.Add(permSourceMailbox); var trusteeString = string.Join(",", trustees); using (var process = new PsLauncher().LaunchPowerShellInstance("AddPermission.ps1", $" -login {sourceLogin}" + $" -password {sourcePassword}" + $" -mailbox {sourceMailbox}" + $" -trustees {trusteeString}" + $" -accessRights FullAccess" , "x64")) { while (!process.StandardOutput.EndOfStream) { var line = process.StandardOutput.ReadLine(); Log.Info(line); if (line.Contains("wasn't found")) { Log.Fatal(line); Assert.Fail(line); } } process.WaitForExit(); } }
public void Select_Catalog_Product() { _product.Click(); Browser.WaitForPageToLoad(); var catalogTitle = Browser.GetDriver().FindElement(_byCatalogTitle); Assert.AreEqual(catalogTitle.Text, RunConfigurator.GetValue("product")); }
public DiscoveryQueueTest() { RunConfigurator.RunPath = "resources/probeRun.xml"; //connectionString = RunConfigurator.GetValueByXpath("//DiscoveryQueueProbe/@connectionString").DecryptChk(); threshold = int.Parse(RunConfigurator.GetValueByXpath("//DiscoveryQueueProbe/@threshold")); instanceName = ConfigurationManager.AppSettings.Get("Instance"); XmlConfigurator.Configure(); Log = LogManager.GetLogger(typeof(DiscoveryQueueTest)); }
public ProbeTest(string probeType) { RunOnce(); RunConfigurator.RunPath = "resources/probeRun.xml"; _connectionString = $"Server={RunConfigurator.GetValueByXpath("//sql//server")};Database={RunConfigurator.GetValueByXpath("//sql//db")};User Id={RunConfigurator.GetValueByXpath("//sql//user")};Password={RunConfigurator.GetValueByXpath("//sql//password")};"; _probeType = probeType; InitialStoring(_probeType); CleanUp(); }
public void SetupSecondUserFirstProject() { LoginAndSelectRole(RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//user"), RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//password"), RunConfigurator.GetValueByXpath("//metaname[text()='client2']/../name")); User.AtTenantRestructuringForm().AddProjectClick(); User.AtChooseYourProjectTypeForm().ChooseMailWithDiscovery(); User.AtChooseYourProjectTypeForm().GoNext(); User.AtSetProjectNameForm().SetName(RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/../name")); User.AtSetProjectNameForm().GoNext(); User.AtSetProjectDescriptionForm().SetDescription(StringRandomazer.MakeRandomString(20)); User.AtSetProjectDescriptionForm().GoNext(); User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T1->T2", "source", "user"), RunConfigurator.GetTenantValue("T1->T2", "source", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(1); User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T1->T2", "target", "user"), RunConfigurator.GetTenantValue("T1->T2", "target", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(2); User.AtAddTenantsForm().GoNext(); User.AtSelectSourceTenantForm().SelectTenant(RunConfigurator.GetTenantValue("T1->T2", "source", "name")); User.AtSelectSourceTenantForm().GoNext(); User.AtSelectTargetTenantForm().SelectTenant(RunConfigurator.GetTenantValue("T1->T2", "target", "name")); User.AtSelectTargetTenantForm().GoNext(); User.AtReviewTenantPairsForm().GoNext(); User.AtSelectSourceDomainForm().SelectDomain(RunConfigurator.GetTenantValue("T1->T2", "source", "domain")); User.AtSelectSourceDomainForm().GoNext(); User.AtSelectTargetDomainForm().SelectDomain(RunConfigurator.GetTenantValue("T1->T2", "target", "domain")); User.AtSelectTargetDomainForm().GoNext(); User.AtReviewDomainsPairsForm().GoNext(); User.AtMigrationTypeForm().SelectGroupsOption(); User.AtMigrationTypeForm().GoNext(); User.AtSelectMigrationGroupForm().SetGroup(RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//metaname[text()='adgroup1']/../name")); User.AtSelectMigrationGroupForm().SelectGroup(RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//metaname[text()='adgroup1']/../name")); User.AtSelectMigrationGroupForm().GoNext(); User.AtReviewGroupsForm().GoNext(); User.AtHowToMatchUsersForm().GoNext(); User.AtMigrationWavesForm().GoNext(); User.AtDefineMigrationWavesForm().SelectNo(); User.AtDefineMigrationWavesForm().GoNext(); User.AtSyncScheduleForm().GoNext(); User.AtGoodToGoForm().GoNext(); User.AtBeginDiscoveryForm().GoNext(); User.AtDiscoveryProgressForm().WaitForDiscoveryIsCompleted(); User.AtDiscoveryIsCompleteForm().GoNext(); User.AtProjectOverviewForm().OpenUsersList(); }
public void SetupFirstUserFirstProject() { LoginAndSelectRole(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name")); AddMailOnlyProject(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"), RunConfigurator.GetTenantValue("T1->T2", "source", "user"), RunConfigurator.GetTenantValue("T1->T2", "source", "password"), RunConfigurator.GetTenantValue("T1->T2", "target", "user"), RunConfigurator.GetTenantValue("T1->T2", "target", "password"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='file1']/..//filename")); User.AtProjectOverviewForm().OpenUsersList(); }
public void SetupTest() { LoginAndSelectRole(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name")); User.AtTenantRestructuringForm().AddProjectClick(); User.AtChooseYourProjectTypeForm().ChooseMailOnly(); User.AtChooseYourProjectTypeForm().GoNext(); User.AtSetProjectNameForm().SetName(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//name")); User.AtSetProjectNameForm().GoNext(); User.AtSetProjectDescriptionForm().SetDescription(StringRandomazer.MakeRandomString(20)); User.AtSetProjectDescriptionForm().GoNext(); User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T3->T4", "source", "user"), RunConfigurator.GetTenantValue("T3->T4", "source", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(1); User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T3->T4", "target", "user"), RunConfigurator.GetTenantValue("T3->T4", "target", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(2); User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T1->T2", "target", "user"), RunConfigurator.GetTenantValue("T1->T2", "target", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(3); User.AtAddTenantsForm().GoNext(); User.AtUploadFilesForm().DownloadSample(); RunConfigurator.CheckUserMatchFileIsDownloaded(); User.AtUploadFilesForm().SelectFile(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//metaname[text()='file1']/..//filename")); User.AtUploadFilesForm().WaitUntillFileUploaded(); User.AtUploadFilesForm().GoNext(); User.AtUploadedUsersForm().GoNext(); User.AtAlmostDoneForm().VerifySubmitIsEnabled(); User.AtAlmostDoneForm().GoBack(); User.AtEnablePublicFoldersForm().GoBack(); User.AtUploadedUsersForm().GoBack(); User.AtUploadFilesForm().GoBack(); User.AtAddTenantsForm().RemoveTenant(RunConfigurator.GetTenantValue("T1->T2", "target", "name")); User.AtAddTenantsForm().GoNext(); User.AtKeepUsersForm().SelectKeepExisting(); User.AtKeepUsersForm().GoNext(); User.AtSyncScheduleForm().GoNext(); User.AtAlmostDoneForm().GoNext(); User.AtProjectOverviewForm().OpenUsersList(); }
public void PerformTwoTenantsAdding() { User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T1->T2", "source", "user"), RunConfigurator.GetTenantValue("T1->T2", "source", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(1); User.AtAddTenantsForm().OpenOffice365LoginFormPopup(); Office365TenantAuthorization(RunConfigurator.GetTenantValue("T1->T2", "target", "user"), RunConfigurator.GetTenantValue("T1->T2", "target", "password")); Browser.GetDriver().SwitchTo().Window(Store.MainHandle); User.AtAddTenantsForm().WaitForTenantAdded(2); }
public void Automation_MO_UserMigrationTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName1 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string projectName2 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//name"); string sourceDomain1 = RunConfigurator.GetTenantValue("T1->T2", "source", "domain"); string targetDomain1 = RunConfigurator.GetTenantValue("T1->T2", "target", "domain"); string groupMailbox1 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry1']/..//group"); string filename1 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='file1']/..//filename"); string sourceDomain2 = RunConfigurator.GetTenantValue("T3->T4", "source", "domain"); string targetDomain2 = RunConfigurator.GetTenantValue("T3->T4", "target", "domain"); string groupMailbox5 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//metaname[text()='entry5']/..//group"); string filename2 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project2']/..//metaname[text()='file1']/..//filename"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName1); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().VerifyLinesCountAndProperties(sourceDomain1, targetDomain1, RunConfigurator.GetCSVlinesCount(Path.GetFullPath(RunConfigurator.ResourcesPath + filename1))); User.AtUsersForm().SelectAllLines(); User.AtUsersForm().SelectAction(ActionType.AddToWave); User.AtUsersForm().Apply(); User.AtUsersForm().SelectMigrationGroup(groupMailbox1); User.AtUsersForm().AddToWave(); User.AtUsersForm().VerifyLinesCountAndProperties(groupMailbox1, RunConfigurator.GetCSVlinesCount(Path.GetFullPath(RunConfigurator.ResourcesPath + filename1))); User.AtUsersForm().SelectAllLines(); User.AtUsersForm().OpenTenantRestructuring(); SelectProject(projectName2); User.AtProjectOverviewForm().GetUsersCount(); User.AtProjectOverviewForm().AssertReadyUserEqualToAll(); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().VerifyLinesCountAndProperties(sourceDomain2, targetDomain2, RunConfigurator.GetCSVlinesCount(Path.GetFullPath(RunConfigurator.ResourcesPath + filename2))); User.AtUsersForm().SelectAllLines(); User.AtUsersForm().SelectAction(ActionType.AddToWave); User.AtUsersForm().Apply(); User.AtUsersForm().SelectMigrationGroup(groupMailbox5); User.AtUsersForm().AddToWave(); User.AtUsersForm().VerifyLinesCountAndProperties(groupMailbox5, RunConfigurator.GetCSVlinesCount(Path.GetFullPath(RunConfigurator.ResourcesPath + filename2))); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void SetUp() { TenantAUid = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantA}']/uid"); TenantADomain = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantA}']/domain"); TenantAUser = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantA}']/user"); TenantAPwd = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantA}']/password"); CheckValues(TenantAUid, TenantADomain, TenantAUser, TenantAPwd); TenantBUid = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantB}']/uid"); TenantBDomain = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantB}']/domain"); TenantBUser = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantB}']/user"); TenantBPwd = RunConfigurator.GetValueByXpath($"//tenants/tenant[@metaname='{tenantB}']/password"); CheckValues(TenantBUid, TenantBDomain, TenantBUser, TenantBPwd); }
public void Automation_MO_FilterTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string sourceMailbox6 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry6']/..//source"); string groupMailbox6 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry6']/..//group"); string profileMailbox6 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry6']/..//profile"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().SyncUserByLocator(sourceMailbox6); User.AtUsersForm().ConfirmSync(); User.AtUsersForm().AssertUserHaveSyncingState(sourceMailbox6); User.AtUsersForm().SwitchFilter(FilterState.Open); User.AtUsersForm().SetMatched(); User.AtUsersForm().SwitchFilter(FilterState.Closed); Thread.Sleep(5000); User.AtUsersForm().StoreEntriesData(); User.AtUsersForm().AssertStateIsFilteredFor("Matched"); User.AtUsersForm().SwitchFilter(FilterState.Open); User.AtUsersForm().SetMatched(); Thread.Sleep(5000); User.AtUsersForm().CheckFilterGroup(groupMailbox6); User.AtUsersForm().SwitchFilter(FilterState.Closed); Thread.Sleep(5000); User.AtUsersForm().StoreEntriesData(); User.AtUsersForm().AssertGroupIsFilteredFor(groupMailbox6); User.AtUsersForm().SwitchFilter(FilterState.Open); User.AtUsersForm().UncheckFilterGroup(groupMailbox6); Thread.Sleep(5000); User.AtUsersForm().CheckFilterGroup(profileMailbox6); User.AtUsersForm().SwitchFilter(FilterState.Closed); Thread.Sleep(5000); User.AtUsersForm().StoreEntriesData(); User.AtUsersForm().AssertProfileIsFilteredFor(profileMailbox6); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void PS_MD_StartDeltaDiscoveryTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//name"); string sourceTenant = RunConfigurator.GetTenantValue("T1->T2", "source", "name"); string sourceAdminLogin = RunConfigurator.GetTenantValue("T1->T2", "source", "user"); string sourceAdminPassword = RunConfigurator.GetTenantValue("T1->T2", "source", "password"); string sourceMailbox1 = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//metaname[text()='entry1']/..//source"); try { using (var process = new PsLauncher().LaunchPowerShellInstance("DeltaDiscoveryModify.ps1", $" -slogin {sourceAdminLogin}" + $" -spassword {sourceAdminPassword}" + $" -mailbox {sourceMailbox1}", "x64")) { while (!process.StandardOutput.EndOfStream) { var line = process.StandardOutput.ReadLine(); Log.Info(line); } process.WaitForExit(); LoginAndSelectRole(login, password, client); SelectProject(projectName); try { User.AtProjectOverviewForm().EditTenants(); } catch (Exception) { User.AtProjectOverviewForm().EditTenants(); } User.AtTenantsConfigurationForm().OpenDiscoveryTab(); User.AtTenantsConfigurationForm().RunDiscovery(sourceTenant); } } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void StoreDOM() { try { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string sourceMailbox = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry2']/..//source"); LoginAndSelectRole(login, password, client); } catch (Exception e) { Log.Info(Browser.GetDriver().PageSource); throw e; } }
public void Automation_MO_ExportTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string sourceMailbox1 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry1']/..//source"); string sourceMailbox2 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry2']/..//source"); string groupMailbox3 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry3']/..//group"); string sourceMailbox3 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry3']/..//source"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().SelectEntryBylocator(sourceMailbox1); User.AtUsersForm().ExportUsers(); RunConfigurator.CheckUsersExportFileIsDownloaded(); User.AtUsersForm().SelectEntryBylocator(sourceMailbox1); User.AtUsersForm().SelectEntryBylocator(sourceMailbox2); User.AtUsersForm().ExportUsers(); RunConfigurator.CheckUsersExportFileIsDownloaded(); User.AtUsersForm().SelectEntryBylocator(sourceMailbox2); User.AtUsersForm().OpenGroupFilter(); User.AtUsersForm().SelectFilterGroup(groupMailbox3); Thread.Sleep(3000); User.AtUsersForm().CloseModalWindow(); User.AtUsersForm().SelectEntryBylocator(sourceMailbox3); User.AtUsersForm().ExportUsers(); RunConfigurator.CheckUsersExportFileIsDownloaded(); User.AtUsersForm().PerformSearch(sourceMailbox1); User.AtUsersForm().VerifyLinesCount(1); User.AtUsersForm().SelectEntryBylocator(sourceMailbox1); User.AtUsersForm().ExportUsers(); RunConfigurator.CheckUsersExportFileIsDownloaded(); } catch (Exception e) { LogHtml(Browser.GetDriver().PageSource); throw e; } }
public void Automation_MO_ContentExistsTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().AssertAllContentBlocksArePresent(); User.AtProjectOverviewForm().AssertConnectionsStatusesExist(1); } catch (Exception e) { LogHtml(Browser.GetDriver().PageSource); throw e; } }
public void AddRegisteredClient() { try { User.AtMainForm().GoToClientRegistration(); //Fill in First name User.AtRegistrationForm().SetFirstName(StringRandomazer.MakeRandomFirstName()); //Fill in Last name User.AtRegistrationForm().SetLastName(StringRandomazer.MakeRandomLastName()); //Fill in Phone User.AtRegistrationForm().SetPhone(StringRandomazer.MakeRandomPhone()); //Fill in Email User.AtRegistrationForm().SetEmail(RunConfigurator.GetValue("client.usermail")); User.AtRegistrationForm().GoNext(); //Fill in Random Company Name User.AtRegistrationForm().SetClientName(StringRandomazer.MakeRandomClientName()); //Fill in Address User.AtRegistrationForm().SetAddress(StringRandomazer.MakeRandomAddress()); //Fill in City User.AtRegistrationForm().SetCity(RunConfigurator.GetValue("client.city")); //Fill in State User.AtRegistrationForm().SetState(RunConfigurator.GetValue("client.state")); //Fill in Country User.AtRegistrationForm().SetCountryDropDown(RunConfigurator.GetValue("client.country")); //Fill in zip User.AtRegistrationForm().SetZip(StringRandomazer.MakeRandomZip()); //Procced to Register User.AtRegistrationForm().Submit(); User.AtOffice365LoginForm().SetLogin(RunConfigurator.GetValue("client.usermail")); User.AtOffice365LoginForm().SetPassword(RunConfigurator.GetValue("client.password")); User.AtOffice365LoginForm().NextClick(); //Validate Tenant Project List View is displayed with no data. User.AtTenantRestructuringForm().AssertNoDataForNewClient(); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_MO_TenantConfigurationTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string sourceMailbox10 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry10']/..//source"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().OpenUsersList(); User.AtUsersForm().OpenDetailsByLocator(sourceMailbox10); User.AtUsersForm().AssertDetailsSyncButtonIsEnabled(); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_MD_DiscoveryProcessTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//name"); string userAmount = RunConfigurator.GetValueByXpath("//metaname[text()='client2']/..//metaname[text()='project1']/..//metaname[text()='adgroup1']/../amount"); try { LoginAndSelectRole(login, password, client); SelectProject(projectName); User.AtProjectOverviewForm().WaitTillDiscoveryIsComplete(10); User.AtProjectOverviewForm().GetUsersCount(); User.AtProjectOverviewForm().AssertDiscoveredUserCount(userAmount); User.AtProjectOverviewForm().AssertMigrationUserCount(); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void Automation_MO_SortingTest() { string login = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"); string password = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"); string client = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name"); string projectName = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name"); string filename = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='file1']/..//filename"); string sourceMailbox4 = RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//metaname[text()='entry4']/..//source"); try { LoginAndReloadFile(login, password, client, projectName, filename); User.AtProjectOverviewForm().OpenUsersList(); Thread.Sleep(5000); User.AtUsersForm().StoreEntriesData(); User.AtUsersForm().SortSource(); Thread.Sleep(5000); User.AtUsersForm().AssertSourceSorted(); User.AtUsersForm().StoreEntriesData(); User.AtUsersForm().SortTarget(); Thread.Sleep(5000); User.AtUsersForm().AssertTargetSorted(); User.AtUsersForm().SyncUserByLocator(sourceMailbox4); User.AtUsersForm().ConfirmSync(); User.AtUsersForm().AssertUserHaveSyncingState(sourceMailbox4); User.AtUsersForm().StoreEntriesData(); User.AtUsersForm().SortStatus(); Thread.Sleep(5000); User.AtUsersForm().AssertStatusSorted(); User.AtUsersForm().StoreEntriesData(); } catch (Exception) { LogHtml(Browser.GetDriver().PageSource); throw; } }
public void PSwaits() { LoginAndSelectRole(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//user"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//password"), RunConfigurator.GetValueByXpath("//metaname[text()='client1']/../name")); var launcher = new PsLauncher(); var testProc = launcher.TestLaunchPowerShellInstance("TestScript.ps1", String.Empty, "x64"); while (!testProc.StandardOutput.EndOfStream) { var line = testProc.StandardOutput.ReadLine(); Log.Info(line); if (line.Contains("Press")) { launcher.SuspendProcess(); Log.Info("SUCCESS"); Log.Info("SUCCESS"); Log.Info("SUCCESS"); Thread.Sleep(5000); //KeySender.SendKeyToProcess(testProc); launcher.ResumeProcess(); } } testProc.WaitForExit(5000); SelectProject(RunConfigurator.GetValueByXpath("//metaname[text()='client1']/..//metaname[text()='project1']/..//name")); }