private void SetPageObject(string PageName) { switch (PageName) { case "Strapi Data Dictionaries": _currentPage = StrapiDataDictionariesPage; break; case "Strapi Data Dictionary Entities": _currentPage = StrapiDataDictionaryEntitiesPage; break; case "Strapi Data Dictionary Fields": _currentPage = StrapiDataDictionaryFieldsPage; break; case "Strapi Intro": _currentPage = StrapiIntroPage; break; case "Strapi Release Schedule": _currentPage = StrapiReleaseSchedulePage; break; } }
public void ArrayChallenge_RecursiveSolution() { BasePageObject.Get <HomePageObject>() .RenderChallengeButtonElement .Click(); int[] firstRowValues = BasePageObject.Get <ArrayChallengePageObject>() .FirstRowValues; int[] secondRowValues = BasePageObject.Get <ArrayChallengePageObject>() .SecondRowValues; int[] thirdRowValues = BasePageObject.Get <ArrayChallengePageObject>() .ThirdRowValues; int?firstRowAnswer = ArrayIndexWhereLeftEqualsRightRecursively(firstRowValues); int?secondRowAnswer = ArrayIndexWhereLeftEqualsRightRecursively(secondRowValues); int?thirdRowAnswer = ArrayIndexWhereLeftEqualsRightRecursively(thirdRowValues); BasePageObject.Get <ArrayChallengePageObject>() .PopulateAnswerForm(new DTOs.AnswerForm { FirstAnswer = firstRowAnswer.ToString(), SecondAnswer = secondRowAnswer.ToString(), ThirdAnswer = thirdRowAnswer.ToString(), Name = "Thomas Shipley" }) .SubmitAnswerForm() .Get <DialogPageObject>() .WaitForSuccessMessage() .CloseButtonElement .Click(); }
public MailBusinessObject(BasePageObject baseSetup) { layoutPageObject = new GmailLayoutPageObject(baseSetup); composeModalPageObject = new ComposeModalPageObject(baseSetup); messageListPageObject = new MessageListPageObject(baseSetup); messagePageObject = new MessagePageObject(baseSetup); }
public void StartWebDriver() { if (driver == null) { driver = InitializeChromeDriver.StartChromeDriver(); } BasePageObject basePageObject = new BasePageObject(); basePageObject.GoToHomePage(); driver.WaitForPageToLoad(); }
/// <summary> /// Construct a new BasicPageElement /// </summary> /// <param name="objBy">The By Locator.</param> /// <param name="webDriver">The WebDriver.</param> /// <param name="waitModel">Wait-Options for this element.</param> /// <param name="parentPageObject">The <see cref="BasePageObject"/> this <see cref="BasicPageElement"/> belongs to.</param> /// <param name="clickBehaviour">The ClickBehaviour.</param> public BasicPageElement(By byLocator, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default) { _waitAfterClick = waitModel.WaitAfterAction == 0 ? TimeSpan.Zero : new TimeSpan(0, 0, 0, 0, waitModel.WaitAfterAction); _waitBeforeClick = waitModel.WaitBeforeAction == 0 ? TimeSpan.Zero : new TimeSpan(0, 0, 0, 0, waitModel.WaitBeforeAction); _elementsBeforeClick = waitModel.WaitForElementsBeforeAction; _elementsAfterClick = waitModel.WaitForElementsAfterAction; By = byLocator; WebDriver = webDriver; ParentPageObject = parentPageObject; ClickBehaviour = TestContext.ClickBehaviourFactory.Create(clickBehaviour, this); }
public AbstractPageSettings GetPageSettings(BasePageObject pageObject) { PagePropsAttribute pageAttributes = (PagePropsAttribute)pageObject.GetType().GetCustomAttribute(typeof(PagePropsAttribute), true); if (pageAttributes != null && pageAttributes.PageSettings != null) { return((AbstractPageSettings)Activator.CreateInstance(pageAttributes.PageSettings, pageObject)); } return(new DefaultSettings(pageObject)); }
public void ThenIShouldBeDirectedToThePageInANewTab(string pageName) { switch (pageName) { case CoinCapPage: BasePageObject po = ((CoinCapPageObject)ScenarioContext.Current.Get <BasePageObject>()); po.SwitchToNewTab(); po.VerifyPageLoaded(); break; default: Assert.Fail(string.Format("Page [{0}] not implemented; please add to CommonStepDefinitions.ThenIShouldBeDirectedToThePageInANewTab", pageName)); break; } }
public DerivedLink(By objBy, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default) : base(objBy, webDriver, waitModel, parentPageObject, clickBehaviour) { }
public DerivedInput(By objBy, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default, FillBehaviour fillBehaviour = FillBehaviour.Default) : base(objBy, webDriver, waitModel, parentPageObject, clickBehaviour, fillBehaviour) { }
protected AbstractPageSettings(BasePageObject pageObject) { PageObject = pageObject; PageUsesJquery = false; HasEndlessJQueryAnimation = false; }
public DerivedBasicPageElement(By byLocator, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default) : base(byLocator, webDriver, waitModel, parentPageObject, clickBehaviour) { }
public Input(By objBy, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default, FillBehaviour fillBehaviour = FillBehaviour.Default) : base(objBy, webDriver, waitModel, parentPageObject, clickBehaviour) { _fillBehaviour = TestContext.FillBehaviourFactory.Create(fillBehaviour, this); }
public GeneralSteps() { _basePageObject = new BasePageObject(); }
public SelectBox(By objBy, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ISelectable selectBehaviour = null) : base(objBy, webDriver, waitModel, parentPageObject, ClickBehaviours.Default) { _selectBehaviour = selectBehaviour ?? new DefaultSelectBehaviour(this); }
public TPageObjectType Navigate() { this.Element.Click(); return(BasePageObject.CreatePageObject <TPageObjectType>(_driver)); }
public DefaultSettings(BasePageObject pageObject) : base(pageObject) { }
public void TearDown() { var basePageObject = new BasePageObject(); basePageObject.DisposeDriver(); }
public DerivedSelectBox(By objBy, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ISelectable selectBehaviour = null) : base(objBy, webDriver, waitModel, parentPageObject, selectBehaviour) { }
public BaseTest() { BasePageObject = new BasePageObject(); }
public Link(By objBy, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default) : base(objBy, webDriver, waitModel, parentPageObject, clickBehaviour) { }
public Button(By byLocator, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentBasePageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default) : base(byLocator, webDriver, waitModel, parentBasePageObject, clickBehaviour) { }
public DerivedImage(By byLocator, IWebDriver webDriver, WaitModel waitModel, BasePageObject parentPageObject, ClickBehaviours clickBehaviour = ClickBehaviours.Default) : base(byLocator, webDriver, waitModel, parentPageObject, clickBehaviour) { }