Esempio n. 1
0
        public ForgotPasswordPage(FluentTest test) : base(test)
        {
            Url = TargetEnvironment.GetApplicationUrl("/#/forgot-password");
            At  = () => I.Expect.Exists(EmailInput);

            _server = SimpleSmtpServer.Start(25);
        }
        public HomePage(FluentTest test) : base(test)
        {
            var currentPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
            var uri         = string.Format("{0}\\testPages\\index.html", currentPath);

            Url = uri;
            At  = () => I.Expect.Exists(SecondPageLink);
        }
Esempio n. 3
0
 public HomePage(FluentTest test)
     : base(test)
 {
     // the url of the page
     Url = @"http://www.amazon.com/";
     // the element to search for to make sure we are on the right page
     At = () => I.Expect.Exists("#twotabsearchtextbox");
 }
Esempio n. 4
0
 public SalesLoginPage(FluentTest test)
     : base(test)
 {
     this.Url = string.Format("{0}/{1}", TestCase.Environment, "/sales/login");
     this.At  = () => { };
     this.I.Expect.Exists(SalesLoginElements.UserNameInput);
     this.I.Expect.Exists(SalesLoginElements.PasswordInput);
 }
Esempio n. 5
0
 public SigninPage(FluentTest test) : base(test, "/adm/signin")
 {
     At = () => {
         test.I.Expect.Exists(Email);
         test.I.Expect.Exists(Password);
         test.I.Expect.Exists(SigninButton);
         test.I.Expect.Exists(InvalidUserAlert);
     };
 }
Esempio n. 6
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (this.I != null)
                {
                    this.I.Dispose();
                    this.I = null;
                }

                if (this.FluentTest != null)
                {
                    this.FluentTest.Dispose();
                    this.FluentTest = null;
                }
            }
        }
        public TestViewModel()
        {
            MessengerInstance.Register <GenericMessage <TestDetails> >(this, (test) =>
            {
                DispatcherHelper.CheckBeginInvokeOnUI(() =>
                {
                    // only handle one test at a time!
                    if (this.RemoteCommands.Count == 0)
                    {
                        this.Browsers = new ObservableCollection <BrowserType>(test.Content.Browsers);
                        foreach (var commandItem in test.Content.RemoteCommands)
                        {
                            this.RemoteCommands.Add(new RemoteCommandViewModel
                            {
                                CommandName            = commandItem.Key.GetType().Name,
                                RemoteCommand          = commandItem.Key,
                                RemoteCommandArguments = commandItem.Value
                            });
                        }

                        this.Name = "Received at " + DateTime.Now.ToLongTimeString();
                        this.ExecuteButtonVisibility = this.RemoteCommands.Count == 0 ? Visibility.Collapsed : Visibility.Visible;

                        // new test class so we can grab the proper provider
                        FluentTest testClass = new FluentTest();
                        this._manager        = testClass.I;
                        if (this.Browsers.Count > 0)
                        {
                            var selectedBrowser = this.Browsers[0];

                            if (selectedBrowser == BrowserType.InternetExplorer)
                            {
                                this._requiresSTA = true;
                            }

                            this._manager.Use(this.Browsers[0]);
                        }

                        if (testClass.ProviderName.Contains("WatiN"))
                        {
                            this._requiresSTA = true;
                        }
                    }
                });
            });
        }
Esempio n. 8
0
        public F14N Run(string name, Action <IActionSyntaxProvider> action)
        {
            if (!StartTime.HasValue)
            {
                StartTime = DateTime.Now;
            }
            if (Results.Count != 0)
            {
                Console.WriteLine();
            }
            ConsoleHelper.DrawMessageBox(2, string.Format("Running test: {0}", name));
            Console.WriteLine();

            var test = new FluentTest();

            try
            {
                var provider = test.I; // Must be accessed to initialize values
                action(provider);

                Results.Add(new TestResult()
                {
                    Name   = name,
                    Passed = true
                });
            }
            catch (Exception ex)
            {
                Results.Add(new TestResult()
                {
                    Name      = name,
                    Passed    = false,
                    Exception = ex,
                    Message   = GetExceptionMessageString(ex)
                });
            }
            finally
            {
                test.Dispose();
            }

            return(this);
        }
Esempio n. 9
0
 public SalesHomePage(FluentTest test)
     : base(test)
 {
     this.At = () => this.I.Expect.Exists(SalesHomeElements.Container);
 }
Esempio n. 10
0
 public BudgetCreatePage(FluentTest test) : base(test)
 {
     this.Url = $"{PageContext.Domain}/Budget/Add";
 }
Esempio n. 11
0
 public SearchPage(FluentTest test) : base(test)
 {
     Url = "http://google.com";
     At  = () => I.Expect.Exists(SearchTextBox);
 }
Esempio n. 12
0
 public ResultsPage(FluentTest test)
     : base(test)
 {
 }
Esempio n. 13
0
 public BudgetCreatePage(FluentTest test) : base(test)
 {
     //this.Url = $"{PageContext.Domain}/budget/add";
     this.Url = PageContext.Domain + "/budget/add";
 }
 public GoogleSearchPage(FluentTest test)
     : base(test)
 {
     Url = "https://www.google.com";
 }
 public BingSearchResultsPage(FluentTest test)
     : base(test)
 {
     At = () => I.Expect.Exists(SearchResultsContainer);
 }
 public SecondPage(FluentTest test) : base(test)
 {
     At = () => I.Expect.Exists(SecondPageDiv);
 }
Esempio n. 17
0
 public AlertsPage(FluentTest test)
     : base(test)
 {
     this.Url = "/Alerts";
 }
Esempio n. 18
0
 public DragPage(FluentTest test)
     : base(test)
 {
     this.Url = "/DragAndDrop";
 }
Esempio n. 19
0
 public HomePage(FluentTest test) : base(test, "/adm/")
 {
 }
Esempio n. 20
0
 public BookQueryPage(FluentTest test) : base(test)
 {
     this.Url = $"{PageContext.Domain}/book/query";
 }
Esempio n. 21
0
 public PageBase()
 {
     SeleniumWebDriver.Bootstrap(SeleniumWebDriver.Browser.Chrome);
     this.FluentTest = new FluentTest();
     this.I          = this.FluentTest.I;
 }
Esempio n. 22
0
 public ApprenticesAndTrainingPage(FluentTest test) : base(test)
 {
 }
Esempio n. 23
0
 public BudgetPage(FluentTest test) : base(test)
 {
     Url = $"{ContextInfo.baseUrl}/budgets/add";
 }
Esempio n. 24
0
 public BudgetCreatePage(FluentTest test) : base(test)
 {
 }
Esempio n. 25
0
 public LoginPage(FluentTest test)
     : base(test)
 {
     Url = TargetEnvironment.GetApplicationUrl("/");
     At  = () => I.Expect.Exists(EmailInput);
 }
Esempio n. 26
0
 public HomePage(FluentTest test) : base(test)
 {
     Url = "https://www.koffiewarenhuis.nl/";
     // At = () => I.Assert.Visible(Element1);
 }
Esempio n. 27
0
 public HomePage(FluentTest test) : base(test)
 {
     Url = ConfigurationManager.AppSettings["Homepage"];
     At  = () => I.Assert.Visible(NewsletterInput);
 }
 public BingSearchPage(FluentTest test)
     : base(test)
 {
     Url = "http://bing.com/";
     At  = () => I.Expect.Exists(SearchInput);
 }
 public ScrollingPage(FluentTest test)
     : base(test)
 {
     this.Url = "/Scrolling";
 }
Esempio n. 30
0
 public SumAmountPage(FluentTest test) : base(test)
 {
     this.Url = "http://localhost:61804/Home/SumAmount";
 }