public EdgeTestObject(IBrowser browser, ITestObjectLocator toLocator, IToolDependencyResolver resolver) { this.browser = browser; Resolver = resolver; TestObjectLocator = toLocator; WaitFor = Resolver.Resolve <IWaitFor>(browser.GetInstance().GetDriver <IWebDriver>(), toLocator.GetLocator()); }
public ParentPage(IBasePage basePage) { BasePage = basePage; ToolDependencyResolver = basePage.GetToolDependencyResolver(); Resolver = basePage.GetResolver(); TestObjectFactory = ToolDependencyResolver.Resolve <ITestObjectFactory>(basePage.GetBrowser()); }
public FirefoxTestObject(IBrowser browser, ITestObjectLocator toLocator, IToolDependencyResolver resolver) { this.browser = browser; Resolver = resolver; TestObjectLocator = toLocator; WaitFor = Resolver.Resolve <IWaitFor>(browser.GetInstance().GetDriver <IWebDriver>(), toLocator.GetLocator()); JSExecuter = new CustomJavaScriptExecuter(browser.GetInstance().GetDriver <IWebDriver>()); }
public BasePage(IBrowser browser, IDependencyResolver resolver, IToolDependencyResolver toolDependencyResolver) { _browser = browser; _resolver = resolver; _toolDependencyResolver = toolDependencyResolver; _screenShotTaker = _toolDependencyResolver.Resolve <IScreenshotTaker>(this.GetBrowser()); HomePage = _resolver.Resolve <HomePage>(this); LoginPage = _resolver.Resolve <LoginPage>(this); }
public IVerification VerifyDisplayStyleWith(string displayValue) { IVerification info = Resolver.Resolve <IVerification>(); string script = "var element = arguments[0];"; script += "return element.style.display;"; IJavaScriptExecutor js = (IJavaScriptExecutor)GetDriver(); string displayStyle = js.ExecuteScript(script, GetAutomationElement()).ToString(); info.Expected = displayValue; info.Actual = displayStyle; if (displayStyle.Contains(displayValue)) { info.Result = true; } else { info.Result = false; } return(info); }
public ITestObject Get(Locator locator, string value) { TOLocator = Resolver.Resolve <ITestObjectLocator>(locator, value); return(Get(TOLocator)); }