internal SynchronisedElementScope(ElementFinder elementFinder,
                                   DriverScope outerScope,
                                   Options options)
     : base(elementFinder, outerScope)
 {
     this.options = options;
 }
Beispiel #2
0
 internal FillInWith(Element element, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.element       = element;
     this.driver        = driver;
     this.robustWrapper = robustWrapper;
     this.scope         = scope;
     this.options       = options;
 }
Beispiel #3
0
 internal FillInWith(string locator, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.locator       = locator;
     this.driver        = driver;
     this.robustWrapper = robustWrapper;
     this.scope         = scope;
     this.options       = options;
 }
Beispiel #4
0
 internal SelectFrom(string option, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
 {
     this.option        = option;
     this.driver        = driver;
     this.robustWrapper = robustWrapper;
     this.scope         = scope;
     this.options       = options;
 }
Beispiel #5
0
 internal SelectFrom(string option, Driver driver, TimingStrategy timingStrategy, DriverScope scope, Options options, DisambiguationStrategy disambiguationStrategy)
 {
     this.option                 = option;
     this.driver                 = driver;
     this.timingStrategy         = timingStrategy;
     this.scope                  = scope;
     this.options                = options;
     this.disambiguationStrategy = disambiguationStrategy;
 }
Beispiel #6
0
 internal DriverScope(ElementFinder elementFinder, DriverScope outerScope)
 {
     if (outerScope != null)
     {
         SetScope(outerScope);
     }
     if (elementFinder != null)
     {
         SetFinder(elementFinder);
     }
 }
Beispiel #7
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;
 }
 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;
 }
Beispiel #9
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;
 }
Beispiel #10
0
 internal SelectFrom(string option,
                     IDriver driver,
                     TimingStrategy timingStrategy,
                     DriverScope scope,
                     Options options,
                     DisambiguationStrategy disambiguationStrategy)
 {
     _option                 = option;
     _driver                 = driver;
     _timingStrategy         = timingStrategy;
     _scope                  = scope;
     _options                = options;
     _disambiguationStrategy = disambiguationStrategy;
 }
Beispiel #11
0
        public void Init(string xpath, DriverScope outerScope, Options options)
        {
            if (xpath == null)
            {
                xpath = defaultLocator;
            }

            init         = true;
            this.options = Merge(options);
            SetScope(outerScope);
            SetFinder(new XPathFinder(driver, xpath, outerScope, this.options));

            UpdateChildrenScope(this);
        }
Beispiel #12
0
        protected void UpdateChildrenScope(DriverScope scope)
        {
            var fields = GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);

            foreach (var f in fields)
            {
                if (typeof(IHaveScope).IsAssignableFrom(f.FieldType))
                {
                    var e = (IHaveScope)f.GetValue(this);
                    if (e != null)
                    {
                        e.SetScope(scope);
                    }
                }
            }
        }
Beispiel #13
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);
            }
        }
Beispiel #14
0
 public void SetScope(DriverScope s)
 {
     scope = s;
 }
Beispiel #15
0
 internal BrowserWindow(ElementFinder elementFinder,
                        DriverScope outerScope) : base(elementFinder, outerScope)
 {
 }
Beispiel #16
0
 internal ElementScope(ElementFinder elementFinder, DriverScope outerScope)
     : base(elementFinder, outerScope)
 {
 }
Beispiel #17
0
 public TableScope(DriverScope b, bool header, params string[] locators)
 {
     SetScope(b);
     this.isHeader = header;
     this.locators = locators;
 }
 internal SnapshotElementScope(Element element, DriverScope scope, Options options)
     : base(null, scope)
 {
     this.element = element;
     this.options = options;
 }
Beispiel #19
0
 internal RobustElementScope(ElementFinder elementFinder, DriverScope outerScope, Options options)
     : base(elementFinder, outerScope)
 {
     this.options = options;
 }
 public static IEnumerable <SnapshotElementScope> AsSnapshotElementScopes(this IEnumerable <Element> elements, DriverScope driverScope, Options options)
 {
     return(elements.Select(elementFound => new SnapshotElementScope(elementFound, driverScope, options)));
 }
Beispiel #21
0
 internal FillInWith(ElementScope element, Driver driver, RobustWrapper robustWrapper, DriverScope scope, Options options)
     : this(element.Now(), driver, robustWrapper, scope, options)
 {
 }
Beispiel #22
0
 internal SnapshotElementScope(ElementFound elementFound, DriverScope scope) : base(null, scope)
 {
     _elementFound = elementFound;
 }
Beispiel #23
0
 public TableScope(DriverScope b, params string[] locators)
 {
     SetScope(b);
     this.locators = locators;
 }
Beispiel #24
0
 internal DeferredElementScope(ElementFinder elementFinder, DriverScope outer)
     : base(elementFinder, outer)
 {
 }