public void TestSetup() { driver = WebDriverFactory.CreateDriver( MajorWebDriver.Chrome, WindowSize.DefaultDesktop); var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton(driver) .AddSingleton(new PageOptions { Url = Startup.ServerUrl }); pageObjectFactory = new PageObjectFactory(serviceCollection); widgetPage = pageObjectFactory.PreparePage <HomePage>() .GoToWidget( "jQueryUI", "1.12", "Accordian"); accordionComponent = pageObjectFactory.PrepareComponent( new AccordionComponent <WidgetPage>( new AccordionComponentOptions(), By.CssSelector("#accordion"), pageObjectFactory, driver, widgetPage)); }
public void ClosePanelTest() { accordionComponent = pageObjectFactory.PrepareComponent( new AccordionComponent <WidgetPage>( new AccordionComponentOptions { Collaspable = true }, By.CssSelector("#accordion"), pageObjectFactory, driver, widgetPage)); accordionComponent.ClosePanel(); Assert.IsFalse(accordionComponent.HasOpenPanel()); }