public ActionResult ViewPage(string pageSlug)
        {
            var pageFactory = new PageFactory(this.session);
            var page = pageFactory.CreateFromSlug(pageSlug);
            if (page == null)
            {
                return new HttpNotFoundResult("No such page.");
            }

            var pageToPageViewModelMapper = new PageToPageViewModelMapper(this.session, this.Url);
            var pageViewModel = pageToPageViewModelMapper.Map(page);

            return this.View(pageViewModel);
        }
        public ActionResult ViewEntry(string pageSlug, string entrySlug)
        {
            var pageFactory = new PageFactory(this.session);
            var page = pageFactory.CreateFromSlug(pageSlug);
            if (page == null)
            {
                return new HttpNotFoundResult("No such page.");
            }

            var entryFactory = new EntryFactory(this.session);
            var entry = entryFactory.CreateFromSlug(entrySlug);
            if (entry == null)
            {
                return new HttpNotFoundResult("No such entry.");
            }

            var entryToEntryViewModelMapper = new EntryToEntryViewModelMapper(this.session, this.Url);
            var entryViewModel = entryToEntryViewModelMapper.Map(entry);

            entryViewModel.PageSlug = pageSlug;

            return this.View(entryViewModel);
        }
 public BasePage(IWebDriver driver)
 {
     this.driver = driver;
     PageFactory.InitElements(driver, this);
 }
Example #4
0
 public LeadershipPO()
 {
     PageFactory.InitElements(AppDriver.driver, this);
 }
 public MemberCreationFourthPage(IWebDriver usedBrowser) : base(usedBrowser, false)
 {
     driver = usedBrowser;
     PageFactory.InitElements(driver, this);
 }
 public AlertBoxPageObject()
 {
     PageFactory.InitElements(PropertiesCollection.driver, this);
 }
Example #7
0
 public Offers(IWebDriver driver)
 {
     _driver = driver;
     PageFactory.InitElements(_driver, this);
 }
Example #8
0
        public SearchPage(IWebDriver driver)
        {
            _driver = driver;

            PageFactory.InitElements(_driver, this);
        }
Example #9
0
 public ValidationPopUpMessages()
 {
     WebContext.WebDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(MarksheetConstants.Timeout));
     PageFactory.InitElements(WebContext.WebDriver, this);
 }
 public ViewCalculationResultPage()
 {
     PageFactory.InitElements(Driver._driver, this);
 }
Example #11
0
 public Common()
 {
     PageFactory.InitElements(Common.d, this);
 }
Example #12
0
 public MainPage(IWebDriver driver)
 {
     PageFactory.InitElements(driver, this);
     this.driver = driver;
 }
Example #13
0
 public Homepage(IWebDriver driver)
 {
     PageFactory.InitElements(driver, this);
 }
 public void InitPages()
 {
     PageFactory.InitElements(driver, this);
 }
Example #15
0
 public LoginFormPageObject()
 {
     PageFactory.InitElements(PropertiesCollection.driver, this);
 }
Example #16
0
 public AviaCompanyPage(IWebDriver driver, ILog logger) : base(driver, logger)
 {
     PageFactory.InitElements(driver, this);
 }
 public void TestInit()
 {
     PageFactory = new PageFactory();
     HomePage = PageFactory.GetPage<HomePage>(typeof(HomePage));
     LoginPage = PageFactory.GetPage<LoginPage>(typeof(LoginPage));
     AccountOverviewPage = PageFactory.GetPage<AccountOverviewPage>(typeof(AccountOverviewPage));
     CollectionsPage = PageFactory.GetPage<CollectionsPage>(typeof(CollectionsPage));
     NavigationBarPage = PageFactory.GetPage<NavigationBarPage>(typeof(NavigationBarPage));
     CheckoutCartPage = PageFactory.GetPage<CheckoutCartPage>(typeof(CheckoutCartPage));
     MadeInUsaPage = PageFactory.GetPage<MadeInUsaPage>(typeof(MadeInUsaPage));
     TieItemPage = PageFactory.GetPage<TieItemPage>(typeof(TieItemPage));
 }
Example #18
0
 public TestScenariosPage()
 {
     PageFactory.InitElements(Driver.driver, this);
 }
Example #19
0
 public PassengerPage(IWebDriver driver)
 {
     this.driver = driver;
     wait        = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
     PageFactory.InitElements(driver, this);
 }
 public BingMainPage(IWebDriver browser)
 {
     _driver = browser;
     PageFactory.InitElements(browser, this);
 }
Example #21
0
 public CompleteOrderPage(WebDriverFactory webDriverFactory)
 {
     _webDriverFactory = webDriverFactory;
     PageFactory.InitElements(_webDriverFactory.Driver.Get(), this);
 }
 public ExtendedPage(DriverContext driverContext) : base(driverContext)
 {
     PageFactory.InitElements(driverContext.Driver, this);
 }
 public PageDeposit1()
 {
     PageFactory.InitElements(Program.driver, this);
 }
Example #24
0
 public Registrationpage()
 {
     PageFactory.InitElements(Hooks.Drive, this);
 }
Example #25
0
 public BasePage()
 {
     PageFactory.InitElements(Driver, this);
 }
 public GridFilterPage(IWebDriver driver)
 {
     this.driver = driver;
     PageFactory.InitElements(driver, this);
 }
Example #27
0
        public TrashPage()
        {
            IWebDriver driver = Browser.GetDriver();

            PageFactory.InitElements(driver, this);
        }
Example #28
0
 public LoginPage()
 {
     PageFactory.InitElements(Hooks.Driver, this);
 }
Example #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Product"/> class.
 /// </summary>
 /// <param name="driver">control application</param>
 public Product(AndroidDriver <AndroidElement> driver)
 {
     this.driver = driver;
     PageFactory.InitElements(driver, this);
 }
Example #30
0
 public InboxPage(IWebDriver driver)
 {
     this.driver = driver;
     PageFactory.InitElements(this.driver, this);
 }
Example #31
0
 public CensusDetailsSection()
 {
     PageFactory.InitElements(WebContext.WebDriver, this);
 }
 public ForgotPwdPageObjects(IWebDriver driver)
 {
     this.driver = driver;
     PageFactory.InitElements(driver, this);
 }
 private static Page GetPageForSlug(IDocumentSession session, string slug)
 {
     var pageFactory = new PageFactory(session);
     return pageFactory.CreateFromSlug(slug);
 }
Example #34
0
 public DashboardPage(IWebDriver driver)
 {
     this.driver = driver;
     PageFactory.InitElements(this, new RetryingElementLocator(this.driver, TimeSpan.FromSeconds(20)));
 }