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

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