public WebDriver( IWebDriver seleniumDriver, Func <Uri> rootUrl, SeleniumGridConfiguration configuration, IRetryExecutor retryExecutor, ISelectorFactory selectorFactory, IElementFactory elementFactory, IXpathProvider xpathProvider, IMovieLogger movieLogger, IWebElementSourceLog webElementSourceLog, IEnumerable <SelectorPrefix> prefixes = null) { SeleniumDriver = seleniumDriver; SuccessfulSearchers = new List <Searcher>(); RootUrl = rootUrl; SeleniumGridConfiguration = configuration; RetryExecutor = retryExecutor; SelectorFactory = selectorFactory; MovieLogger = movieLogger; Prefixes = prefixes?.ToList() ?? new List <SelectorPrefix>() { new EmptySelectorPrefix() }; Children = new List <WebDriver>(); Screenshots = new List <byte[]>(); ElementFactory = elementFactory; XpathProvider = xpathProvider; WebElementSourceLog = webElementSourceLog; }
public TableElement( IWebElement table, IWebDriver driver, IElementFactory elementFactory, IXpathProvider xpathProvider) { RootElement = table; Driver = driver; IsValid = true; Header = new Dictionary <string, int>(); ElementFactory = elementFactory; XpathProvider = xpathProvider; }
public HoldingsService(IXpathProvider xpathProvider) { _xpathProvider = xpathProvider; }
public SelectorFactory( IElementFactory elementFactory, IXpathProvider xpathProvider) { ElementFactory = elementFactory; XpathProvider = xpathProvider; Selectors = new Dictionary <string, List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > > { { SelectorNames.Settable, new List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > { ByForAttribute, ByNestedInLabel(XpathProvider.SettableElements), ByNested(XpathProvider.SettableElements), ByText(XpathProvider.SettableElements), ByLabelledBy, RadioByName, ByFollowingMarker(XpathProvider.SettableElements), ByCellBelow(XpathProvider.SettableElements), ByLabelAncestor(XpathProvider.ActiveElements), } }, { SelectorNames.Clickable, new List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > { ByForAttribute, ByNestedInLabel(XpathProvider.ClickableElements), ByNested(XpathProvider.ClickableElements), ByText(XpathProvider.ClickableElements), ByTitle, RadioByName, SpecialButtons, ByFollowingMarker(XpathProvider.ClickableElements), ByCellBelow(XpathProvider.ClickableElements), ByTypeAncestor(XpathProvider.ActiveElements), } }, { SelectorNames.Active, new List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > { ByForAttribute, ByNestedInLabel(XpathProvider.ActiveElements), ByNested(XpathProvider.ActiveElements), ByText(XpathProvider.ActiveElements), ByTitle, ByLabelledBy, RadioByName, SpecialButtons, ByFollowingMarker(XpathProvider.ActiveElements), ByCellBelow(XpathProvider.ActiveElements), ByLabelAncestor(XpathProvider.ActiveElements), ByTypeAncestor(XpathProvider.ActiveElements), } }, { SelectorNames.Content, new List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > { ByContentSelf, ByContentSelfForRow, ByContent } }, { SelectorNames.Selectable, new List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > { ByForAttribute, ByNestedInLabel(XpathProvider.SelectableElements), ByNested(XpathProvider.SelectableElements), ByText(XpathProvider.SelectableElements), ByLabelledBy, ByFollowingMarker(XpathProvider.SelectableElements), ByCellBelow(XpathProvider.SelectableElements), } }, { SelectorNames.Checkable, new List <Func <string, IEnumerable <SelectorPrefix>, IWebDriver, IEnumerable <Element> > > { ByForAttribute, ByNestedInLabel(XpathProvider.CheckableElements), ByNested(XpathProvider.CheckableElements), ByText(XpathProvider.CheckableElements), ByLabelledBy, ByFollowingMarker(XpathProvider.CheckableElements), ByCellBelow(XpathProvider.CheckableElements), ByLabelAncestor(XpathProvider.CheckableElements), } }, }; Prefixes = new Dictionary <string, List <Func <string, IEnumerable <string> > > > { { PrefixNames.Row, new List <Func <string, IEnumerable <string> > > { TableRow, DivRoleRow, } }, { PrefixNames.Under, new List <Func <string, IEnumerable <string> > > { ParentDiv, ParentDivWithRowRole, FollowingRow, Legend } }, { PrefixNames.Warning, new List <Func <string, IEnumerable <string> > > { } }, { PrefixNames.Error, new List <Func <string, IEnumerable <string> > > { } } }; }
public SecuritiesService(IXpathProvider xpathProvider) { _xpathProvider = xpathProvider; }