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);
        }
Example #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");
 }
Example #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);
 }
Example #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);
     };
 }
Example #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;
                        }
                    }
                });
            });
        }
Example #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);
        }
Example #9
0
 public SalesHomePage(FluentTest test)
     : base(test)
 {
     this.At = () => this.I.Expect.Exists(SalesHomeElements.Container);
 }
Example #10
0
 public BudgetCreatePage(FluentTest test) : base(test)
 {
     this.Url = $"{PageContext.Domain}/Budget/Add";
 }
Example #11
0
 public SearchPage(FluentTest test) : base(test)
 {
     Url = "http://google.com";
     At  = () => I.Expect.Exists(SearchTextBox);
 }
Example #12
0
 public ResultsPage(FluentTest test)
     : base(test)
 {
 }
Example #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);
 }
Example #17
0
 public AlertsPage(FluentTest test)
     : base(test)
 {
     this.Url = "/Alerts";
 }
Example #18
0
 public DragPage(FluentTest test)
     : base(test)
 {
     this.Url = "/DragAndDrop";
 }
Example #19
0
 public HomePage(FluentTest test) : base(test, "/adm/")
 {
 }
 public BookQueryPage(FluentTest test) : base(test)
 {
     this.Url = $"{PageContext.Domain}/book/query";
 }
Example #21
0
 public PageBase()
 {
     SeleniumWebDriver.Bootstrap(SeleniumWebDriver.Browser.Chrome);
     this.FluentTest = new FluentTest();
     this.I          = this.FluentTest.I;
 }
Example #22
0
 public ApprenticesAndTrainingPage(FluentTest test) : base(test)
 {
 }
Example #23
0
 public BudgetPage(FluentTest test) : base(test)
 {
     Url = $"{ContextInfo.baseUrl}/budgets/add";
 }
Example #24
0
 public BudgetCreatePage(FluentTest test) : base(test)
 {
 }
Example #25
0
 public LoginPage(FluentTest test)
     : base(test)
 {
     Url = TargetEnvironment.GetApplicationUrl("/");
     At  = () => I.Expect.Exists(EmailInput);
 }
Example #26
0
 public HomePage(FluentTest test) : base(test)
 {
     Url = "https://www.koffiewarenhuis.nl/";
     // At = () => I.Assert.Visible(Element1);
 }
Example #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";
 }
Example #30
0
 public SumAmountPage(FluentTest test) : base(test)
 {
     this.Url = "http://localhost:61804/Home/SumAmount";
 }