public void FluidTest() { var factory = new WebDriverFactory(); var driver = factory.CreateDriver( MajorWebDriver.Chrome, WindowSize.DefaultDesktop); pageObjectFactory = new PageObjectFactory(driver); using (driver) { pageObjectFactory .StartWithPage <IMockAPage>() .ContinueWithPage <IMockAPage, IMockBPage>( pageA => { var searchBar = new InputElement( pageA.WrappedDriver.FindElement( By.CssSelector("*[name='q']"))); searchBar.SetValue("Testing 1 2 3"); searchBar.SendKeys(Keys.Enter); }, pageA => pageObjectFactory.PreparePage <IMockBPage>()) .ContinueWithPage <IMockBPage, IMockDPage>( pageB => { Console.WriteLine("Testing with IMockB."); }, pageB => { var pageA = pageObjectFactory.PreparePage <IMockAPage>(); var pageD = new MockDPage(pageA, pageB, pageObjectFactory, pageB.WrappedDriver); pageD.Load( new Dictionary <string, string> { { "q", "selenium" } }); return(pageD); }) .ContinueWithPage <IMockDPage>( pageC => { Console.WriteLine("Testing with IMockC."); pageC.WrappedDriver .Navigate() .GoToUrl("https://www.google.com/search?q=testing"); Console.WriteLine("Should not reach here."); throw new InternalTestFailureException(); }); } }