private void Initialize(string fileName, ITestOutputHelper output, params LogType[] loggers) { LogManager = new LogManager(output, fileName, loggers); Verify = new Verify(LogManager); ConditionalVerify = new ConditionalVerify(LogManager); SoftVerify = new SoftVerify(LogManager); Verify.VerifyFailed += VerifyOnVerifyFailed; Driver = new Driver(BrowserOptions.Driver, LogManager); if (BrowserOptions.Driver.ImplicitWaitEnabled) { EnableImplicitWait(BrowserOptions.Driver.SecondsToWait); } Find = new Find(Driver, LogManager); SeleniumFind = new SeleniumFind(Driver, LogManager); Navigate = new Navigate(Driver); Window = new Window(Driver); ElementStyle = new ElementStyle(this); Wait = new Wait(this); InitializeScreenShotDirectory(BrowserOptions.Driver.ScreenShotPath); }
/// <summary> /// Find child elements by CSS and locator string. /// </summary> /// <param name="element">Parent element to find children of.</param> /// <param name="locator">String to locate child elements.</param> /// <returns></returns> public static List <Element> FindElements(this Element element, string locator) => element.FindElements(SeleniumFind.Element(LocatorStrategy.Css, locator));