public static void Action(BrowserActionType actionType, BciWebBrowser webBrowser, IWebDriver driver, IWebElement element) { Screenshot ss = ((ITakesScreenshot)driver).GetScreenshot(); string dateString = DateTime.Now.ToString("MM-dd-yyyy-HH.mm.ss"); var path = "C://Selenium"; ss.SaveAsFile($"{path}//{dateString}-{actionType}-{element.Text}.png", ScreenshotImageFormat.Png); }
public void UIActions(List <Action <BrowserActionType, BciWebBrowser, IWebDriver, IWebElement> > actions, BrowserActionType actionType, IWebElement element = null) { foreach (Action <BrowserActionType, BciWebBrowser, IWebDriver, IWebElement> action in actions) { action.Invoke(actionType, this, Driver, element); } }