{"id":19880056,"url":"https://github.com/kochetkov-ma/selenide-pages","last_synced_at":"2025-09-18T19:32:43.393Z","repository":{"id":135925426,"uuid":"425265382","full_name":"kochetkov-ma/selenide-pages","owner":"kochetkov-ma","description":"Page Object Model mini Framework for Selenide","archived":false,"fork":false,"pushed_at":"2024-03-07T12:59:52.000Z","size":93,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-19T17:16:42.562Z","etag":null,"topics":["docker","java","kotest","kotlin","pageobject","selenide","selenium"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kochetkov-ma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-06T14:31:33.000Z","updated_at":"2024-05-14T09:31:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c712fa32-45ef-4f71-be3c-48a5e93684d6","html_url":"https://github.com/kochetkov-ma/selenide-pages","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fselenide-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fselenide-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fselenide-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fselenide-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kochetkov-ma","download_url":"https://codeload.github.com/kochetkov-ma/selenide-pages/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233517440,"owners_count":18688088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","java","kotest","kotlin","pageobject","selenide","selenium"],"created_at":"2024-11-12T17:10:07.751Z","updated_at":"2025-09-18T19:32:43.378Z","avatar_url":"https://github.com/kochetkov-ma.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/org.brewcode/selenide-pages-core)](https://search.maven.org/#search|ga|1|selenide-pages-core)\n# Selenide pages\n\n![selenide pages](pages.png)\n---\n\nFramework based on [Selenide](https://github.com/selenide/selenide) provided convenient functional to create and manage\nyour app [Page Objects](https://www.selenium.dev/documentation/guidelines/page_object_models/) in automation testing.\n\n## Description\n\n- Quickly creating a convenient, extensible PageObject hierarchy based on Selenide.\n- Additional functionality for working with a page and organizing elements structure.\n- Kotlin DSL for Page Object, and fully compatible with Java 17\n- Cucumber steps for using Page Objects\n\n## Modules\n### [`selenide-pages-core`](selenide-pages-core/README.md)\nMain module\n\n### [`selenide-pages-cucumber`](selenide-pages-cucumber/README.md)\nCucumber steps provided `selenide-pages-core` and `Selenide` functions in Gherkin `features` \n\n### [`selenide-pages-sample`](selenide-pages-sample/README.md)\nExample of use on `Kotlin` and `Java`\n\u003e Very interesting! Have a look before using ...\n\n## Getting started\n\n#### Add dependency\n\nAdd `selenide-pages-core` dependency and your favorite testing framework for example `junit-jupiter` \n```groovy\ndependencies {\n    testImplementation \"org.brewcode:selenide-pages-core:1.0.0\"\n    testImplementation \"org.junit.jupiter:junit-jupiter:5.8.2\"\n}\n```\nThe `selenide-pages-core` brings with transitive dependencies:\n- `selenide`\n- `selenium 4`\n- `chrome driver` (without another drivers sush as firefox or edge)\n- `awaitility`\n- `kotlin`\n- `kotest assertions`\n- `slf4j`\n\nThe dependencies above are necessary for the operation of our library. But you can disable it and override \n```groovy\ndependencies {\n    testImplementation(\"org.brewcode:selenide-pages-core:1.0.0\") { transitive false }\n}\n```\n\n#### Create first page\n\n```java\n/**\n * Define selenide page via @Page annotation. Must extend BasePage class.\n * \n * value = \"Getting Started\" - page name for log message\n * path = \"/tutorial/\" - expected path. Will check on page open verify, and will append when open this page\n * expectedTitle = \"Getting Started\" - The title text will check on page open verify\n */\n@Page(value = \"Getting Started\", path = \"/tutorial/\", expectedTitle = \"Getting Started\")\npublic class DockerGettingStartedMainPage extends BasePage\u003cDockerGettingStartedMainPage\u003e {\n\n    /**\n     * Create element collection.\n     * With alias \"Paragraphs\" to use in log messages.\n     * Search by tag name.\n     * \n     * \"required = true\" - This element must be visible on the page after loading. When you open the page, this element must be visible, otherwise an error will occur\n     */\n    @Element(value = \"Paragraphs\", tagName = \"h2\", required = true)\n    public ElementsCollection paragraphs;\n\n    public GettingStartedNavigation gettingStartedNavigation;\n\n    /**\n     * The page block defined.\n     * Must extend Block class.\n     * \n     * Be aware - @Element annotation uses on class instead of field. \n     * But you may use field annotation and field annotation has a higher priority.\n     */\n    @Element(value = \"Getting started navigation\", css = \"nav.md-nav--primary\u003eul\")\n    public static class GettingStartedNavigation extends Block {\n\n        /**\n         * Collection of page blocks.\n         */\n        @Element(value = \"Пункты навигации\", xpath = \"./li\")\n        public Blocks\u003cNavigationItem\u003e navigationItemList;\n    }\n\n    public static class NavigationItem extends Block {\n\n        @Element(value = \"Navigation item\", tagName = \"a\", required = true)\n        public SelenideElement gettingStartedNavigation;\n    }\n}\n```\n\n- Use `@Page` annotation on page class\n- Your page class must inherit the `BasePage` with parameter as self class\n- Use `@Element` annotation for `SelenideElement`, `Block` and `Blocks\u003cT\u003e`\n- Your block class must inherit the `Block`\n\n#### Create test\n\n```java\npublic class FunctionalTest {\n\n    @Test\n    public void test() {\n        final Pages pages = Pages.PagesFactory\n            .createWithStaticSelenideDriver(\"http://localhost\"); // Create Page Factory\n        final DockerGettingStartedMainPage page = pages\n            .page(DockerGettingStartedMainPage.class) // Create page\n            .open() // open page with path from @Page annotation\n            .verify(); // verify that page opened successfully, url is correct, title is expected, all required elements is displayed\n        \n        // interact with element collection and check third element text is not empty\n        page.paragraphs.get(2).shouldNotBe(empty);\n\n        // get block\n        final GettingStartedNavigation block = page.gettingStartedNavigation;\n        block.navigationItemList.getSelf().shouldHave(sizeGreaterThan(0)); // check that list is loaded\n        block.navigationItemList.get(1).gettingStartedNavigation.should(appear); // get element and check\n    }\n}\n```\n\n## Advanced Usage\n\n`in progress ...`\n\n## Kotlin DSL\n\n## Support\n\n- Create an issue on [GitLab selenide-pages](https://gitlab.com/brewcode/selenide-pages)\n- Create an issue on [GitHub selenide-pages](https://github.com/kochetkov-ma/selenide-pages)\n\n**Kochetkov Maxim** - [kochetkov-ma@yandex.ru](mailto:kochetkov-ma@yandex.ru)\n\n## Roadmap\n\nCucumber steps module - expected release date `30.01.2022`\n\n## Contributing\n\nMail to me [kochetkov-ma@yandex.ru](mailto:kochetkov-ma@yandex.ru), and I will add you to GitLab Group\n\n## Authors and acknowledgment\n\n**Kochetkov Maxim** - [kochetkov-ma@yandex.ru](mailto:kochetkov-ma@yandex.ru)\n**Frolov Sergey** - [tbd](mailto:tbd)\n\n## License\n\n`Apache License 2.0`\n\n## Project status\n\nReleased on January 2021\n\n`ACTIVE DEVELOPING`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochetkov-ma%2Fselenide-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkochetkov-ma%2Fselenide-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochetkov-ma%2Fselenide-pages/lists"}