Exemple #1
0
        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));
        }
Exemple #2
0
        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());
        }