Пример #1
0
        public PagesCollection(ICapabilities capabilities, string baseUrl, string hubUrl)
        {
            driver = WebDriverFactory.GetDriver(hubUrl, capabilities);
            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(25));
            //не явное ожидание тут пока

            if (!driver.Url.StartsWith(baseUrl))
            {
                driver.Navigate().GoToUrl(baseUrl);
                if (driver.Url != baseUrl)
                {
                    WebDriverFactory.DismissAll();
                }
            }
            this.baseUrl = baseUrl;



            Login        = InitElements(new LoginPage(this));
            DashBoard    = InitElements(new DashBoardPage(this));
            Lending      = InitElements(new LendingPage(this));
            UserProfile  = InitElements(new UserProfilePage(this));
            SpecialLogin = InitElements(new SupportLoginPage(this));
            Payments     = InitElements(new PaymentsPage(this));
            Documents    = InitElements(new DocumentsPage(this));
            RegN         = InitElements(new RegName(this));
            RegP         = InitElements(new RegPass(this));
            RegDataCo    = InitElements(new RegDataCompany(this));
        }
Пример #2
0
 public void RunInTheEndOfAll()
 {
     WebDriverFactory.DismissAll();
 }