Beispiel #1
0
        public virtual object New(Window window, ScreenRepository screenRepository)
        {
            var o = Activator.CreateInstance(type, window, screenRepository);
            //Get all fields, even from base types
            var fieldInfos = AllTypes(type).SelectMany(t=>t.GetFields(Entity.BindingFlag));
            foreach (var fieldInfo in fieldInfos)
            {
                if (nonInjectedTypes.Any(t=>t.IsAssignableFrom(fieldInfo.FieldType))) continue;

                object injectedObject = null;
                if (typeof(IUIItem).IsAssignableFrom(fieldInfo.FieldType))
                {
                    var interceptor = new UIItemInterceptor(SearchCondition(fieldInfo, window.Framework), window, screenRepository.SessionReport);
                    injectedObject = DynamicProxyGenerator.Instance.CreateProxy(fieldInfo.FieldType, interceptor);
                }
                else if (typeof(AppScreenComponent).IsAssignableFrom(fieldInfo.FieldType))
                {
                    var componentScreenClass = new ScreenClass(fieldInfo.FieldType);
                    injectedObject = componentScreenClass.New(window, screenRepository);
                }

                if (injectedObject != null) fieldInfo.SetValue(o, injectedObject);
            }

            return o;
        }
 public virtual MainScreen SetUp(InitializeOption initializeOption)
 {
     application = new WinformsTestConfiguration().LaunchApplication();
     var screenRepository = new ScreenRepository(application.ApplicationSession);
     mainScreen = screenRepository.Get<MainScreen>("Form1", initializeOption);
     return mainScreen;
 }
Beispiel #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            var imgRepo = new ScreenRepository(Image.FromFile("screenshot.png"));
            //var img = imgRepo.GetPart(PartScreenType.ManaPool).Source;
            var img = imgRepo.Source;

            var solutionDirectory = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../"));

            var workspaceRelativePath = Path.Combine(solutionDirectory, "workspace");
            var modelRelativePath     = Path.Combine(workspaceRelativePath, "model.zip");

            var mlEngine = new MLModelEngine <ModelInput, ModelOutput>(modelRelativePath);

            //取得 label list, 對應 score 順序
            //var labels = mlEngine.RetriveLabels();
            foreach (var part in imgRepo.Parts)
            {
                ModelInput inputData = new ModelInput();
                using (var ms = new MemoryStream())
                {
                    part.Source.Save(ms, img.RawFormat);
                    inputData.Image = ms.ToArray();
                }
                ModelOutput prediction = mlEngine.Predict(inputData);
                //var index = Array.IndexOf(labels, prediction.PredictedLabel);
                //var score = prediction.Score[index];
                img.TagImage(part.Location, prediction);
            }

            pictureBox1.Image = img;
        }
        public virtual ScreenRepository Attach(Application application)
        {
            var screenRepository = new ScreenRepository(application.ApplicationSession, sessionReport);

            screenRepositories.Add(screenRepository);
            return(screenRepository);
        }
        public void InvokeCaptureScreen()
        {
            var screens = ScreenRepository.GetScreens();

            _tdWindows = new TopDrawWindow[screens.Length];
            for (var i = 0; i < screens.Length; i++)
            {
                var sc       = screens[i];
                var tmWindow = new TopDrawWindow(sc);
                tmWindow.WindowStartupLocation = WindowStartupLocation.Manual;
                tmWindow.Left       = sc.ScreenItem.Bounds.Left;
                tmWindow.Top        = sc.ScreenItem.Bounds.Top;
                tmWindow.Width      = sc.ScreenItem.Bounds.Width;
                tmWindow.Height     = sc.ScreenItem.Bounds.Height;
                tmWindow.ResizeMode = ResizeMode.NoResize;
#if !DEBUG
                tmWindow.Topmost = true;
#endif
                tmWindow.WindowStyle = WindowStyle.None;
                //var hwnd = new WindowInteropHelper(tmWindow).Handle;
                //SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_SYSMENU);
                _tdWindows[i] = tmWindow;
                tmWindow.Show();
                tmWindow.ScreenAreaCaptured += TmWindowOnScreenAreaCaptured;
            }
        }
 public virtual MainScreen SetUp(InitializeOption initializeOption)
 {
     application = new WinformsTestConfiguration().LaunchApplication();
     var screenRepository = new ScreenRepository(application.ApplicationSession);
     mainScreen = screenRepository.Get<MainScreen>("MainWindow", initializeOption);
     //mainScreen.Tabs[0].SelectTabPage(2);
     return mainScreen;
 }
 public virtual MainScreen SetUp(InitializeOption initializeOption)
 {
     WinFormTestConfiguration configuration = new WinFormTestConfiguration(string.Empty);
     application = configuration.Launch();
     ScreenRepository screenRepository = new ScreenRepository(application.ApplicationSession);
     mainScreen = screenRepository.Get<MainScreen>("Form1", initializeOption);
     return mainScreen;
 }
        public virtual MainScreen SetUp(InitializeOption initializeOption)
        {
            application = new WinformsTestConfiguration().LaunchApplication();
            var screenRepository = new ScreenRepository(application.ApplicationSession);

            mainScreen = screenRepository.Get <MainScreen>("Form1", initializeOption);
            return(mainScreen);
        }
        public virtual MainScreen SetUp(InitializeOption initializeOption)
        {
            application = new WinformsTestConfiguration().LaunchApplication();
            var screenRepository = new ScreenRepository(application.ApplicationSession);

            mainScreen = screenRepository.Get <MainScreen>("MainWindow", initializeOption);
            //mainScreen.Tabs[0].SelectTabPage(2);
            return(mainScreen);
        }
Beispiel #10
0
 public virtual void LaunchModalWindow()
 {
     launchModal.Click();
     ScreenRepository.GetModal <ModalScreen>("ModalForm", Window, InitializeOption.NoCache).Close();
     linkLaunchesModalWindow.Click();
     ScreenRepository.GetModal <ModalScreen>("ModalForm", Window, InitializeOption.NoCache).Close();
     checkBoxLaunchedModalWindow.Click();
     ScreenRepository.GetModal <ModalScreen>("ModalForm", Window, InitializeOption.NoCache).Close();
 }
        public virtual MainScreen SetUp(InitializeOption initializeOption)
        {
            var configuration = new WinFormTestConfiguration(string.Empty);

            application = configuration.Launch();
            var screenRepository = new ScreenRepository(application.ApplicationSession);

            mainScreen = screenRepository.Get <MainScreen>("Form1", initializeOption);
            return(mainScreen);
        }
        public void Create_PopulatingAutomatically()
        {
            ScreenRepository screenRepository = new ScreenRepository(application.ApplicationSession);
            Dashboard dashboard = screenRepository.Get<Dashboard>("Dashboard", InitializeOption.NoCache);
            CreateCustomerStep1Screen customerStep1Screen = dashboard.LaunchCreateCustomer();

            Customer customer = new Customer("Rahul", "20", "4366654");
            CreateCustomerStep2Screen customerStep2Screen = customerStep1Screen.FillAndNext_UsingAutomaticPopulate(customer);
            customerStep2Screen.Finish_UsingAutomaticPopulate(customer);
        }
Beispiel #13
0
        public void Create_PopulatingAutomatically()
        {
            ScreenRepository          screenRepository    = new ScreenRepository(application.ApplicationSession);
            Dashboard                 dashboard           = screenRepository.Get <Dashboard>("Dashboard", InitializeOption.NoCache);
            CreateCustomerStep1Screen customerStep1Screen = dashboard.LaunchCreateCustomer();

            Customer customer = new Customer("Rahul", "20", "4366654");
            CreateCustomerStep2Screen customerStep2Screen = customerStep1Screen.FillAndNext_UsingAutomaticPopulate(customer);

            customerStep2Screen.Finish_UsingAutomaticPopulate(customer);
        }
Beispiel #14
0
        public void StartApp()
        {
            var binsPath = GetBinariesPath();
            var ciderLocation = Path.GetFullPath(binsPath + "Cider-x64.exe");

            ProcessStartInfo info = new ProcessStartInfo(ciderLocation, "/nocheckversion"); // avoid making HTTP request on each UI test run
            Process ciderProcess = Process.Start(info);

            Application = Application.Attach(ciderProcess);
            ScreenRepository = new ScreenRepository(Application.ApplicationSession);
        }
Beispiel #15
0
        public void ScreensShouldBeCached()
        {
            var application = Substitute.For<Application>();
            var window = Substitute.For<DummyWindow>();
            window.IsClosed.Returns(false);
            application.GetWindow("dummy", InitializeOption.NoCache).ReturnsForAnyArgs(window);
            var applicationSession = Substitute.For<ApplicationSession>();
            applicationSession.Application.Returns(application);

            var screenRepository = new ScreenRepository(applicationSession);
            Assert.That(GetScreen(screenRepository), Is.SameAs(GetScreen(screenRepository)));
        }
Beispiel #16
0
        public void ScreenCachingWithMatches()
        {
            var application = Substitute.For<Application>();
            var window = Substitute.For<DummyWindow>();
            window.Title.Returns("whatever");
            window.IsClosed.Returns(false);
            application.Find(t => true, InitializeOption.NoCache).ReturnsForAnyArgs(window);
            var applicationSession = Substitute.For<ApplicationSession>();
            applicationSession.Application.Returns(application);

            var screenRepository = new ScreenRepository(applicationSession);
            Assert.That(FindScreen(screenRepository), Is.SameAs(FindScreen(screenRepository)));
        }
Beispiel #17
0
 public void ReconnectAfterRestart()
 {
     var ciderProcess = (from process in System.Diagnostics.Process.GetProcessesByName("Cider-x64")
                         select process).FirstOrDefault();
     if (ciderProcess != null)
     {
         Application = Application.Attach(ciderProcess.Id);
         ScreenRepository = new ScreenRepository(Application.ApplicationSession);
     }
     else
     {
         Application = null;
         ScreenRepository = null;
     }
 }
Beispiel #18
0
        public void ScreensShouldBeCached()
        {
            var application = Substitute.For <Application>();
            var window      = Substitute.For <DummyWindow>();

            window.IsClosed.Returns(false);
            application.GetWindow("dummy", InitializeOption.NoCache).ReturnsForAnyArgs(window);
            var applicationSession = Substitute.For <ApplicationSession>();

            applicationSession.Application.Returns(application);

            var screenRepository = new ScreenRepository(applicationSession);

            Assert.That(GetScreen(screenRepository), Is.SameAs(GetScreen(screenRepository)));
        }
Beispiel #19
0
        public void ScreenCachingWithMatches()
        {
            var application = Substitute.For <Application>();
            var window      = Substitute.For <DummyWindow>();

            window.Title.Returns("whatever");
            window.IsClosed.Returns(false);
            application.Find(t => true, InitializeOption.NoCache).ReturnsForAnyArgs(window);
            var applicationSession = Substitute.For <ApplicationSession>();

            applicationSession.Application.Returns(application);

            var screenRepository = new ScreenRepository(applicationSession);

            Assert.That(FindScreen(screenRepository), Is.SameAs(FindScreen(screenRepository)));
        }
Beispiel #20
0
        public void TestMethod1()
        {
            var mainWindow = new ScreenRepository(Application).Get<TodoWindow>("Wpf Todo", InitializeOption.NoCache);
            var newTaskScreen = mainWindow.NewTask();

            const string title = "Write some tests";
            newTaskScreen.Title = title;
            newTaskScreen.Description = "for White";
            newTaskScreen.DueDate = DateTime.Now.AddDays(3);

            newTaskScreen.Create();

            var tasks = mainWindow.Tasks.ToList();
            Assert.AreEqual(1, tasks.Count);
            Assert.AreEqual(title, tasks[0].Title);
        }
        public void Screens_should_be_cached()
        {
            MockRepository mocks = new MockRepository();
            Application mockApplication = mocks.CreateMock<Application>();
            var window = mocks.CreateMock<DummyWindow>();
            SetupResult.For(window.IsClosed).Return(false);
            Expect.Call(mockApplication.GetWindow("dummy", InitializeOption.NoCache)).Return(window).IgnoreArguments();
            var applicationSession = mocks.CreateMock<ApplicationSession>();
            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            var screenRepository = new ScreenRepository(applicationSession);
            Assert.AreSame(GetScreen(screenRepository), GetScreen(screenRepository));

            mocks.VerifyAll();
        }
        public void ScreensShouldBeCached()
        {
            var mocks = new MockRepository();
            var mockApplication = mocks.StrictMock<Application>();
            var window = mocks.StrictMock<DummyWindow>();
            SetupResult.For(window.IsClosed).Return(false);
            Expect.Call(mockApplication.GetWindow("dummy", InitializeOption.NoCache)).Return(window).IgnoreArguments();
            var applicationSession = mocks.StrictMock<ApplicationSession>();
            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            var screenRepository = new ScreenRepository(applicationSession);
            Assert.AreSame(GetScreen(screenRepository), GetScreen(screenRepository));

            mocks.VerifyAll();
        }
        public void ScreenCachingWithMatches()
        {
            var mocks = new MockRepository();
            var mockApplication = mocks.StrictMock<Application>();
            var window = mocks.StrictMock<DummyWindow>();
            SetupResult.For(window.Title).Return("whatever");
            SetupResult.For(window.IsClosed).Return(false);
            Expect.Call(mockApplication.Find(t => true, InitializeOption.NoCache)).Return(window).IgnoreArguments();
            var applicationSession = mocks.StrictMock<ApplicationSession>();
            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            var screenRepository = new ScreenRepository(applicationSession);
            Assert.AreSame(FindScreen(screenRepository), FindScreen(screenRepository));

            mocks.VerifyAll();
        }
        public void Screen_caching_with_matches()
        {
            MockRepository mocks = new MockRepository();
            Application mockApplication = mocks.CreateMock<Application>();
            DummyWindow window = mocks.CreateMock<DummyWindow>();
            SetupResult.For(window.Title).Return("whatever");
            SetupResult.For(window.IsClosed).Return(false);
            Expect.Call(mockApplication.Find(delegate { return true; }, InitializeOption.NoCache)).Return(window).IgnoreArguments();
            ApplicationSession applicationSession = mocks.CreateMock<ApplicationSession>();
            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            ScreenRepository screenRepository = new ScreenRepository(applicationSession);
            Assert.AreSame(FindScreen(screenRepository), FindScreen(screenRepository));

            mocks.VerifyAll();
        }
Beispiel #25
0
        public void ScreenShouldRemovedFromCacheWhenClosed()
        {
            var application = Substitute.For<Application>();
            var window = Substitute.For<DummyWindow>();
            window.Title.Returns("dummy");
            window.IsClosed.Returns(false);
            window.Close();
            application.GetWindow("dummy", InitializeOption.NoCache).ReturnsForAnyArgs(window);
            var applicationSession = Substitute.For<ApplicationSession>();
            applicationSession.Application.Returns(application);

            var screenRepository = new ScreenRepository(applicationSession);
            var screen = GetScreen(screenRepository);
            Assert.That(GetScreen(screenRepository), Is.SameAs(screen));
            screen.Close();
            GetScreen(screenRepository);
            application.ReceivedWithAnyArgs(2).GetWindow("dummy", InitializeOption.NoCache);
        }
Beispiel #26
0
        public void TestMethod1()
        {
            var mainWindow    = new ScreenRepository(Application).Get <TodoWindow>("Wpf Todo", InitializeOption.NoCache);
            var newTaskScreen = mainWindow.NewTask();

            const string title = "Write some tests";

            newTaskScreen.Title       = title;
            newTaskScreen.Description = "for White";
            newTaskScreen.DueDate     = DateTime.Now.AddDays(3);

            newTaskScreen.Create();

            var tasks = mainWindow.Tasks.ToList();

            Assert.AreEqual(1, tasks.Count);
            Assert.AreEqual(title, tasks[0].Title);
        }
Beispiel #27
0
        protected override void CreateComponents()
        {
            ScreenRepositoryImpl  = new ScreenRepository();
            DesktopRepositoryImpl = new DesktopRepository();
            WindowRepositoryImpl  = new WindowRepository(new WindowIdMock.WindowIdMockEqualityComparer());
            ScreenOsServiceImpl   = new ScreenOsServiceMock();
            WindowOsServiceImpl   = new WindowOsServiceMock();
            KeyServiceImpl        = new KeyServiceMock();
            FenesterServiceImpl   = new FenesterService(ScreenRepository, DesktopRepository, WindowRepository, ScreenOsService, WindowOsService, KeyService, RunService);

            AddComponent(ScreenRepositoryImpl);
            AddComponent(DesktopRepositoryImpl);
            AddComponent(WindowRepositoryImpl);
            AddComponent(ScreenOsServiceImpl);
            AddComponent(WindowOsServiceImpl);
            AddComponent(KeyServiceImpl);
            AddComponent(FenesterServiceImpl);
        }
Beispiel #28
0
        protected override void CreateComponents()
        {
            RunServiceImpl       = new RunService(RunWindowStrategy.WinForms);
            KeyServiceImpl       = new KeyServiceHotKey(RunServiceImpl);
            RectangleServiceImpl = new RectangleService();
            WindowOsServiceImpl  = new WindowOsService();
            WindowRepositoryImpl = new WindowRepository(new WindowId.WindowIdEqualityComparer());
            ScreenOsServiceImpl  = new ScreenOsService();
            ScreenRepositoryImpl = new ScreenRepository();

            AddComponent(RunService);
            AddComponent(KeyService);
            AddComponent(RectangleService);
            AddComponent(WindowOsService);
            AddComponent(WindowRepository);
            AddComponent(ScreenOsService);
            AddComponent(ScreenRepository);
        }
Beispiel #29
0
        private void LaunchApplication(string auctionId)
        {
            var directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var location      = Path.Combine(directoryName, @"AuctionSniper.exe");

            _app = Application.Launch(new ProcessStartInfo(
                                          location, auctionId));

            var workConfiguration =
                new WorkConfiguration
            {
                ArchiveLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                Name            = "AuctionSniper"
            };

            _workSession = new WorkSession(workConfiguration, new NullWorkEnvironment());

            _screenRepository = _workSession.Attach(_app);
        }
Beispiel #30
0
        public void ScreenCachingWithMatches()
        {
            var mocks           = new MockRepository();
            var mockApplication = mocks.StrictMock <Application>();
            var window          = mocks.StrictMock <DummyWindow>();

            SetupResult.For(window.Title).Return("whatever");
            SetupResult.For(window.IsClosed).Return(false);
            Expect.Call(mockApplication.Find(t => true, InitializeOption.NoCache)).Return(window).IgnoreArguments();
            var applicationSession = mocks.StrictMock <ApplicationSession>();

            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            var screenRepository = new ScreenRepository(applicationSession);

            Assert.AreSame(FindScreen(screenRepository), FindScreen(screenRepository));

            mocks.VerifyAll();
        }
        public void ScreenShouldRemovedFromCacheWhenClosed()
        {
            var mocks = new MockRepository();
            var mockApplication = mocks.CreateMock<Application>();
            DummyWindow window = mocks.CreateMock<DummyWindow>();
            Expect.Call(window.Title).Return("dummy");
            SetupResult.For(window.IsClosed).Return(false);
            window.Close();
            Expect.Call(mockApplication.GetWindow("dummy", InitializeOption.NoCache)).Return(window).IgnoreArguments().Repeat.Twice();
            ApplicationSession applicationSession = mocks.CreateMock<ApplicationSession>();
            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            ScreenRepository screenRepository = new ScreenRepository(applicationSession);
            DummyScreen screen = GetScreen(screenRepository);
            Assert.AreSame(screen, GetScreen(screenRepository));
            screen.Close();
            GetScreen(screenRepository);
            mocks.VerifyAll();
        }
Beispiel #32
0
        public PassoDoTeste(TestCase parent)
        {
            //if (parent.SistemaPai == null)
            //{
            //    MessageBox.Show("Passo do Teste: parent.SistemaPai == null");
            //}
            //else
            //{
            //    MessageBox.Show("sistema " + parent.SistemaPai.Nome);
            //}
            telasPossiveis = ScreenRepository.getAllTelas(parent.SistemaPai);

            //telasPossiveis = new ObservableCollection<Tela>(parent.SistemaPai.telas);
            resultado           = new AcaoDynResult();
            this.TestCaseParent = parent;
            List <Screen> telas = telasPossiveis.ToList();

            telas.OrderBy(tela => tela.Nome);
            telasPossiveis = new ObservableCollection <Screen>(telas);
        }
        public void ScreenShouldRemovedFromCacheWhenClosed()
        {
            var mocks = new MockRepository();
            var mockApplication = mocks.StrictMock<Application>();
            var window = mocks.StrictMock<DummyWindow>();
            Expect.Call(window.Title).Return("dummy");
            SetupResult.For(window.IsClosed).Return(false);
            window.Close();
            Expect.Call(mockApplication.GetWindow("dummy", InitializeOption.NoCache)).Return(window).IgnoreArguments().Repeat.Twice();
            var applicationSession = mocks.StrictMock<ApplicationSession>();
            SetupResult.For(applicationSession.Application).Return(mockApplication);
            mocks.ReplayAll();

            var screenRepository = new ScreenRepository(applicationSession);
            DummyScreen screen = GetScreen(screenRepository);
            Assert.AreSame(screen, GetScreen(screenRepository));
            screen.Close();
            GetScreen(screenRepository);
            mocks.VerifyAll();
        }
Beispiel #34
0
        public void ScreenShouldRemovedFromCacheWhenClosed()
        {
            var application = Substitute.For <Application>();
            var window      = Substitute.For <DummyWindow>();

            window.Title.Returns("dummy");
            window.IsClosed.Returns(false);
            window.Close();
            application.GetWindow("dummy", InitializeOption.NoCache).ReturnsForAnyArgs(window);
            var applicationSession = Substitute.For <ApplicationSession>();

            applicationSession.Application.Returns(application);

            var screenRepository = new ScreenRepository(applicationSession);
            var screen           = GetScreen(screenRepository);

            Assert.That(GetScreen(screenRepository), Is.SameAs(screen));
            screen.Close();
            GetScreen(screenRepository);
            application.ReceivedWithAnyArgs(2).GetWindow("dummy", InitializeOption.NoCache);
        }
Beispiel #35
0
        public virtual object New(Window window, ScreenRepository screenRepository)
        {
            object o = @class.New(window, screenRepository);
            @class.EachField(delegate(FieldInfo fieldInfo)
                                 {
                                     if (nonInjectedTypes.IsAssignableFrom(fieldInfo.FieldType)) return;
                                     object injectedObject = null;
                                     if (typeof (IUIItem).IsAssignableFrom(fieldInfo.FieldType))
                                     {
                                         var interceptor = new UIItemInterceptor(SearchCondition(fieldInfo), window, screenRepository.SessionReport);
                                         injectedObject = DynamicProxyGenerator.Instance.CreateProxy(interceptor, fieldInfo.FieldType);
                                     }
                                     else if (typeof (AppScreenComponent).IsAssignableFrom(fieldInfo.FieldType))
                                     {
                                         var componentScreenClass = new ScreenClass(new Class(fieldInfo.FieldType));
                                         injectedObject = componentScreenClass.New(window, screenRepository);
                                     }

                                     if (injectedObject != null) fieldInfo.SetValue(o, injectedObject);
                                 });
            return o;
        }
Beispiel #36
0
        private IDisposable SetMainWindow(WindowsFramework framework)
        {
            try
            {
                var configuration = TestConfigurationFactory.Create(framework);
                Application = configuration.LaunchApplication();
                Repository  = new ScreenRepository(Application);
                MainWindow  = configuration.GetMainWindow(Application);
                MainScreen  = configuration.GetMainScreen(Repository);

                return(new ShutdownApplicationDisposable(this));
            }
            catch (Exception e)
            {
                logger.Error("Failed to launch application and get main window", e);
                if (Application != null)
                {
                    Application.Close();
                }
                throw;
            }
        }
 private static DummyScreen FindScreen(ScreenRepository screenRepository)
 {
     return screenRepository.Get<DummyScreen>(t => true, InitializeOption.NoCache);
 }
Beispiel #38
0
 public NewTaskScreen(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
 public DummyScreen(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
 public override MainScreen GetMainScreen(ScreenRepository repository)
 {
     return null;
 }
 public MainProgressBars(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
Beispiel #42
0
 public virtual BrowseFolderScreen ClickBrowse()
 {
     browseButton.Click();
     return(ScreenRepository.GetModal <BrowseFolderScreen>("This is a description", Window, InitializeOption.NoCache));
 }
Beispiel #43
0
 public MessageBoxScreen(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
Beispiel #44
0
 public override MainScreen GetMainScreen(ScreenRepository repository)
 {
     return(repository.Get <MainScreen>(Criteria(), InitializeOption.NoCache));
 }
Beispiel #45
0
        private IDisposable SetMainWindow(WindowsFramework framework)
        {
            try
            {
                Keyboard = Keyboard.Instance;
                var configuration = TestConfigurationFactory.Create(framework);
                Application = configuration.LaunchApplication();
                Repository = new ScreenRepository(Application);
                MainWindow = configuration.GetMainWindow(Application);
                MainScreen = configuration.GetMainScreen(Repository);

                return new ShutdownApplicationDisposable(this);
            }
            catch (Exception e)
            {
                logger.Error("Failed to launch application and get main window", e);
                if (Application != null)
                    Application.Close();
                throw;
            }
        }
Beispiel #46
0
 public virtual AddTextScreen ClickAddTextUsingDialogTypeLocator()
 {
     addTextUsingDialogTypeLocatorButton.Click();
     return(ScreenRepository.GetModal <AddTextScreen>("Add Text", Window, InitializeOption.NoCache));
 }
Beispiel #47
0
 public ModalScreen(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
Beispiel #48
0
 public AppScreenComponent(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
Beispiel #49
0
 public BaseScreen(Window window, ScreenRepository screenRepository) : base(window, screenRepository) { }
 private static DummyScreen GetScreen(ScreenRepository screenRepository)
 {
     return screenRepository.Get<DummyScreen>("dummy", InitializeOption.NoCache);
 }
 public MainProgressBars(Window window, ScreenRepository screenRepository) : base(window, screenRepository)
 {
 }
Beispiel #52
0
 public virtual AddTextScreen ClickAddTextBySpecifyingDialogType()
 {
     addTextBySpecifyingDialogTypeButton !.Click();
     return(ScreenRepository.GetModal <AddTextScreen>("Add Text", Window, InitializeOption.NoCache));
 }
Beispiel #53
0
 public ScreenClassContainingComponent(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
        public virtual NewTaskScreen NewTask()
        {
            AddTaskButton.Click();

            return(ScreenRepository.GetModal <NewTaskScreen>("New Task", Window, InitializeOption.NoCache));
        }
Beispiel #55
0
 public override MainScreen GetMainScreen(ScreenRepository repository)
 {
     return repository.Get<MainScreen>(Criteria(), InitializeOption.NoCache);
 }
Beispiel #56
0
 public abstract MainScreen GetMainScreen(ScreenRepository repository);
Beispiel #57
0
 public MainScreen(Window window, ScreenRepository screenRepository)
     : base(window, screenRepository)
 {
 }
 protected override void TestSpecificSetup()
 {
     screenRepository = new ScreenRepository(application.ApplicationSession);
     dashboard = screenRepository.Get<Dashboard>("Dashboard", InitializeOption.NoCache);
 }
Beispiel #59
0
 public TodoWindow(Window window, ScreenRepository screenRepository) : base(window, screenRepository)
 {
 }
 public CreateCustomerStep2Screen(Window window, ScreenRepository screenRepository) : base(window, screenRepository) {}