public void ShouldSaveWindowInformationInFile() { File.Delete("foo.xml"); using (WorkSession workSession = WorkSession()) { Application application = new WinformsTestConfiguration().LaunchApplication(); workSession.Attach(application); Window window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo")); window.Get <Button>("ButtonWithTooltip"); } Assert.True(File.Exists("foo.xml")); }
public void ShouldSaveWindowInformationInFile() { var currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); var fooFile = Path.Combine(currentAssemblyDirectory, "foo.xml"); File.Delete(fooFile); using (var workSession = WorkSession()) { var application = new WinformsTestConfiguration().LaunchApplication(); workSession.Attach(application); var window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo")); window.Get <Button>("ButtonWithTooltip"); } Assert.That(File.Exists(fooFile), Is.True); }
public void ShouldFindControlBasedLocation() { File.Delete("foo.xml"); using (var workSession = WorkSession()) { var application = new WinformsTestConfiguration().LaunchApplication(); workSession.Attach(application); var window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo")); window.Get <Button>("ButtonWithTooltip"); } using (var workSession = WorkSession()) { var application = new WinformsTestConfiguration().LaunchApplication(); workSession.Attach(application); var window = application.GetWindow("MainWindow", InitializeOption.NoCache.AndIdentifiedBy("foo")); window.Get <Button>("ButtonWithTooltip"); } }