[TestMethod] public void InitializeNoSeries() { TestScenario.Run(OrderProcessorUserContextManager, TestContext, CreateLoadTestNumberSeries); } public void CreateLoadTestNumberSeries(UserContext userContext) { TestScenario.RunPageAction(TestContext, userContext, NumberSeriesListPageId, form => { var newNumberSeriesListPage = form.Repeater(); //Create No. Series newNumberSeriesListPage.Control("Code").Activate(); TestScenario.SaveValueWithDelay(newNumberSeriesListPage.Control("Code"), "LOADTEST"); newNumberSeriesListPage.Control("Description").Activate(); TestScenario.SaveValueWithDelay(newNumberSeriesListPage.Control("Description"), "General No.Series for all LoadTest Data"); //Create No. Series Lines //var newNumberSeriesLinesPage = newNumberSeriesListPage.Action("Lines").InvokeCatchForm(); //TestScenario.SaveValueWithDelay(newNumberSeriesLinesPage.Control("Starting No."), "LT001_"); //userContext.ValidateForm(newNumberSeriesLinesPage); //Save Values and write to Test Console //TestContext.WriteLine("Created No. Series Code {0}", "LOADTEST"); //TestContext.WriteLine("Created No. Series Lines Starting No. {0}", "LT001_"); //Close both Pages //TestScenario.ClosePage(TestContext, userContext, newNumberSeriesLinesPage); //TestScenario.ClosePage(TestContext, userContext, newNumberSeriesListPage); } ); }
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n