public void AllSearchTest() { browserActions = new BrowserActions(prototypeDriver); browserActions.BingSearch("What is test automation"); browserActions.GoogleSearch("Test automation"); browserActions.YahooSearch("What is test automation"); }
public void UrlTest() { var browserActions = new BrowserActions(Driver); Driver.Url = "http://the-internet.herokuapp.com/"; Assert.AreEqual("http://the-internet.herokuapp.com/", browserActions.GetUrl(), "The url's didn't match."); }
public void PageTitleTest() { var browserActions = new BrowserActions(Driver); Driver.Url = "http://the-internet.herokuapp.com/"; Assert.AreEqual("The Internet", browserActions.GetPageTitle(), "The page titles didn't match."); }
public void SwitchToNewestWindowTest() { var browserActions = new BrowserActions(Driver); var elementActions = new ElementActions(Driver); Driver.Url = "http://the-internet.herokuapp.com/"; elementActions.Click(By.XPath("//a[text()='Multiple Windows']")); elementActions.Click(By.XPath("//a[text()='Click Here']")); browserActions.SwitchToNewestWindow(); Assert.AreEqual("New Window", browserActions.GetPageTitle(), "The newest window page title didn't match."); }
public void StartSession() { Proxy pxoxy = GetProxy(); this.StartDriver(pxoxy); Program.DriverSessions.Add(this); mBrowserActions = new BrowserActions(this.Driver); mLocatLWebElement = new LocateWebElements(this.Driver); Driver.Manage().Timeouts().ImplicitWait = (TimeSpan.FromSeconds((int)ImplicitWait)); Driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds((int)PageLoadTimeOut); Proxy GetProxy() { Proxy P = new Proxy(); ProxyKind proxykind; if (Enum.TryParse(Proxy, out proxykind)) { P.Kind = proxykind; } else { P.Kind = ProxyKind.AutoDetect; } switch (P.Kind) { case ProxyKind.Manual: P.HttpProxy = ProxyUrl; P.SslProxy = ProxyUrl; break; case ProxyKind.ProxyAutoConfigure: P.ProxyAutoConfigUrl = ProxyUrl; break; case ProxyKind.AutoDetect: P.IsAutoDetect = true; break; } return(P); } }
/// <summary> /// Constructor and it holds WebDriver object /// </summary> /// <param name="driverObj">WebDriver object</param> public GoogleSearchPage(IWebDriver driverObj, ScenarioContext scenarioContext) { this._scenarioContext = scenarioContext; _driverObj = driverObj; _browserActionsClassObj = new BrowserActions(_driverObj, this._scenarioContext); }
public BasePage(IWebDriver driver) { ElementActions = new ElementActions(driver); BrowserActions = new BrowserActions(driver); }
protected BaseStepDefinition(ScenarioContext scenarioContext, ControlAction controlAction, BrowserActions browserActions) { this.scenarioContext = scenarioContext; }
public void GivenIGoThePag(string url) { var browserActions = new BrowserActions(); browserActions.GoTo(url); }
protected BaseHooks(ScenarioContext scenarioContext, ControlAction controlAction, BrowserActions browserActions) : base(scenarioContext, controlAction, browserActions) { }
public static void DefaultAfterFeature(BrowserActions browserActions) { browserActions.CloseBrowser(); }
public void OneTimeSetUp() { BrowserAction = new BrowserActions(); ControlAction = new ControlAction(); }
public BaseControlActionTest() { BrowserAction = new BrowserActions(); ControlAction = new ControlAction(); BrowserAction.GoTo(Config.WebAppUrl); }
public void YahooSearchTest() { browserActions = new BrowserActions(prototypeDriver); browserActions.YahooSearch("What is test automation"); }