예제 #1
0
 internal Session(Driver driver, RobustWrapper robustWrapper, Waiter waiter, RestrictedResourceDownloader _restrictedResourceDownloader, UrlBuilder urlBuilder)
 {
     this.driver        = driver;
     this.robustWrapper = robustWrapper;
     this.restrictedResourceDownloader = _restrictedResourceDownloader;
     clicker           = new Clicker(driver, waiter);
     this.urlBuilder   = urlBuilder;
     temporaryTimeouts = new TemporaryTimeouts();
     stateFinder       = new StateFinder(robustWrapper, temporaryTimeouts);
 }
예제 #2
0
 internal DriverScope(SessionConfiguration SessionConfiguration, ElementFinder elementFinder, Driver driver, RobustWrapper robustWrapper, Waiter waiter, UrlBuilder urlBuilder)
 {
     this.elementFinder        = elementFinder ?? new DocumentElementFinder(driver);
     this.SessionConfiguration = SessionConfiguration;
     this.driver        = driver;
     this.robustWrapper = robustWrapper;
     this.waiter        = waiter;
     this.urlBuilder    = urlBuilder;
     stateFinder        = new StateFinder(robustWrapper);
 }
예제 #3
0
 internal DriverScope(ElementFinder elementFinder, DriverScope outer)
 {
     this.elementFinder   = elementFinder;
     driver               = outer.driver;
     robustWrapper        = outer.robustWrapper;
     urlBuilder           = outer.urlBuilder;
     stateFinder          = outer.stateFinder;
     waiter               = outer.waiter;
     options              = outer.SessionConfiguration;
     SessionConfiguration = outer.SessionConfiguration;
 }
예제 #4
0
 internal DriverScope(SessionConfiguration sessionConfiguration, ElementFinder elementFinder, Driver driver, TimingStrategy timingStrategy, Waiter waiter, UrlBuilder urlBuilder, DisambiguationStrategy disambiguationStrategy)
 {
     this.elementFinder        = elementFinder ?? new DocumentElementFinder(driver, sessionConfiguration);
     this.SessionConfiguration = sessionConfiguration;
     this.driver                 = driver;
     this.timingStrategy         = timingStrategy;
     this.waiter                 = waiter;
     this.urlBuilder             = urlBuilder;
     this.DisambiguationStrategy = disambiguationStrategy;
     stateFinder                 = new StateFinder(timingStrategy);
 }
예제 #5
0
 internal DriverScope(ElementFinder elementFinder, DriverScope outerScope)
 {
     this.elementFinder     = elementFinder;
     this.outerScope        = outerScope;
     driver                 = outerScope.driver;
     timingStrategy         = outerScope.timingStrategy;
     urlBuilder             = outerScope.urlBuilder;
     DisambiguationStrategy = outerScope.DisambiguationStrategy;
     stateFinder            = outerScope.stateFinder;
     waiter                 = outerScope.waiter;
     SessionConfiguration   = outerScope.SessionConfiguration;
 }
예제 #6
0
 internal DriverScope(ElementFinder elementFinder,
                      DriverScope outerScope)
 {
     _driver                = outerScope._driver;
     _elementFinder         = elementFinder;
     DisambiguationStrategy = outerScope.DisambiguationStrategy;
     OuterScope             = outerScope;
     SessionConfiguration   = outerScope.SessionConfiguration;
     StateFinder            = outerScope.StateFinder;
     TimingStrategy         = outerScope.TimingStrategy;
     UrlBuilder             = outerScope.UrlBuilder;
     Waiter = outerScope.Waiter;
 }
예제 #7
0
 internal DriverScope(SessionConfiguration sessionConfiguration,
                      ElementFinder elementFinder,
                      IDriver driver,
                      TimingStrategy timingStrategy,
                      Waiter waiter,
                      UrlBuilder urlBuilder,
                      DisambiguationStrategy disambiguationStrategy)
 {
     _driver                = driver;
     _elementFinder         = elementFinder ?? new DocumentElementFinder(driver, sessionConfiguration);
     DisambiguationStrategy = disambiguationStrategy;
     SessionConfiguration   = sessionConfiguration;
     StateFinder            = new StateFinder(timingStrategy);
     TimingStrategy         = timingStrategy;
     UrlBuilder             = urlBuilder;
     Waiter = waiter;
 }
예제 #8
0
        public virtual void SetScope(DriverScope scope)
        {
            outerScope             = scope;
            driver                 = outerScope.driver;
            timingStrategy         = outerScope.timingStrategy;
            urlBuilder             = outerScope.urlBuilder;
            DisambiguationStrategy = outerScope.DisambiguationStrategy;
            stateFinder            = outerScope.stateFinder;
            waiter                 = outerScope.waiter;
            SessionConfiguration   = outerScope.SessionConfiguration;
            outerScope             = scope;

            if (elementFinder != null)
            {
                elementFinder.SetDriver(driver);
                elementFinder.ChangeScope(scope);
            }
        }