public void RunScript() { MainWindow.Ribbon.SelectGroup("Toolbox"); // Abort file window MainWindow.Ribbon.ClickButton("RunScript"); var fileDlg = new FileDialogAdaptor(MainWindow); Assert.That(fileDlg.Title, Is.EqualTo("Open Script...")); fileDlg.Close(); // Select MainWindow.Ribbon.ClickButton("RunScript"); fileDlg = new FileDialogAdaptor(MainWindow); Assert.That(fileDlg.Title, Is.EqualTo("Open Script...")); fileDlg.Load(Path.Combine(TestContext.CurrentContext.TestDirectory, @"..\..\Data\UnitTests\SourceData\Scripts\CreateBoxBody.csx")); // Check for body Assert.AreEqual(1, Pipe.GetValue <int>("$Context.Document.ChildCount")); }